Qualify the round codechef solution- In a coding contest, there are two types of problems: Easy problems, which are worth 11 point each Hard problems, which are worth 22 points each To qualify for the next round, a contestant must score at least XX points. Chef solved AA Easy problems and BB Hard problems. Will Chef qualify or not?

Qualify the round solution codechef

In a coding contest, there are two types of problems:

• Easy problems, which are worth 11 point each
• Hard problems, which are worth 22 points each

To qualify for the next round, a contestant must score at least XX points. Chef solved AA Easy problems and BB Hard problems. Will Chef qualify or not?

Qualify the round solution codechef Input Format

• The first line of input contains a single integer TT, denoting the number of test cases. The description of TT test cases follows.
• Each test case consists of a single line of input containing three space-separated integers — X,AX,A, and BB.

Output Format

For each test case, output a new line containing the answer — Qualify if Chef qualifies for the next round, and NotQualify otherwise.

Each character of the answer may be printed in either uppercase or lowercase. For example, if the answer is Qualify, outputs such as qualifyquALiFyQUALIFY and QuAlIfY will also be accepted as correct.

Constraints Qualify the round solution codechef

• 1T1001≤T≤100
• 1X1001≤X≤100
• 0A,B1000≤A,B≤100

Sample Input 1

3
15 9 3
5 3 0
6 2 8


Sample Output 1

Qualify
NotQualify
Qualify


Explanation Qualify the round solution codechef

Test Case 11: Chef solved 99 easy problems and 33 hard problems, making his total score 91+32=159⋅1+3⋅2=15. He needs at least 1515 points to qualify, which he has and hence he qualifies.

Test Case 22: Chef solved 33 easy problems and 00 hard problems, making his total score 31+02=33⋅1+0⋅2=3. He needs at least 55 points to qualify, which he doesn’t have and hence doesn’t qualify.

Test Case 33: Chef solved 22 easy problems and 88 hard problems, making his total score 21+82=182⋅1+8⋅2=18. He needs at least 66 points to qualify, which he has and hence he qualifies.