Gozz's Payment


Submit solution


Points: 1
Time limit: 1.0s
Memory limit: 512M

Author:
Problem type

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

There are no comments at the moment.