
The first line of input contains an integer ‘T’ denoting the number of test cases to run. Then the test cases follow.
The first and the only line of each test case contains three space-separated integers n, x, and d.
For each test case, print YES if it is possible to survive on the island; else, print NO.
Output for each test case will be printed in a separate line.
You do not need to print anything; it has already been taken care of. Just implement the given function.
1 <= T <= 10^4
1<= n, m, d<=10^8
Where ‘T’ is the total number of test cases and n denotes the units of food the citizen can buy from one day salary, x denotes the units needed to survive each day and d denotes the minimum number of days the citizen needs to survive on the island to escape it.
Time limit: 1 sec
The key idea in solving this problem is to buy each day on which purchase is possible, i.e., six days a week, and try to survive for seven days. If we can survive for one week by induction, we can say that we can survive for any number of days. To survive for one week, we need first to ensure that we can survive for a day.
The algorithm will be -