For this Question: Swastik initially has rupees 1000 with him, he goes to a candy shop to buy some candies. There are only two types of candies available which costs 3 and 7 rupees. Swastik can buy any number of candies he wants, possibly 0, with the money he have.
Given the remaining amount of money he had left with him, your task to check whether the amount he have is possible or not.First line of input contains the number of test cases T, next T lines contains a single integer M(remaining amount).

Constraints :-
1 < = T < = 100
1 < = M < = 1000For each test case, in a new line print "Yes" if possible or "No" if not.Sample Input:-
3
995
997
994

Sample Output:-
No
Yes
Yes, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	public static void main (String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String str[] = br.readLine().trim().split(" ");
        int t = Integer.parseInt(str[0]);
        while(t-->0)
        {
            String strg[] = br.readLine().trim().split(" ");
            int n = Integer.parseInt(strg[0]);

            int diff = 1000 - n;
            if(diff%7 == 0 || diff%3 == 0)
            System.out.println("Yes");
            else
            {
                if(diff == 1 || diff == 2 || diff == 4 || diff == 5 || diff == 8 || diff == 11)
                System.out.println("No");
                else
                System.out.println("Yes");
            }
        }

	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?