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: def check(v):
    if(v==0):
        return True
    if(v<3):
        return False
    if(v%3==0 or v%7==0):
        return True
    return check(v-3) or check(v-7)
t=int(input())
for i in range(0,t):
    value=int(input())
    value=1000-value
    if(check(value)):
        print ("Yes")
    else:
        print ("No"), In this Programming Language: Python, Now tell me if this Code is compilable or not?