Gozz's Payment
Gozz needs to pay exactly \(X\) dollars to Max on a bet (Gozz bet that NP = P). Gozz only has \(a\) $5 coins, and \(b\) $7 coins. Can he pay Max exactly \(X\) dollars?
Input Specification
The first line contains an integer \(T\), the number of test cases to follow. The next \(T\) lines each contain three space-separated integers, \(X\), \(a\), and \(b\) respectively (\(1 \leq a,b,X \leq 100\)).
Output Specification
For each each test case, output either YES
if Gozz can pay exactly $\(X\) dollars, or NO
otherwise..
Sample Input
2
12 1 1
14 3 1
Sample Output
YES
NO
Comments