Problem
No play and eating all day makes your belly fat. This happened to Chef during the lockdown. His weight before the lockdown was w
kg (measured on the most accurate hospital machine) and after months of lockdown, when he measured his weight at home (on a regular scale, which can be inaccurate), he got the result that his weight was kg ().
Scientific research in all growing kids shows that their weights increase by a value between and kg (inclusive) per month, but not necessarily the same value each month. Chef assumes that he is a growing kid. Tell him whether his home scale could be giving correct results.
Input
- The first line of the input contains a single integer denoting the number of test cases. The description of test cases follows.
- The first and only line of each test case contains five space-separated integers , , , and .
Output
For each test case, print a single line containing the integer if the result shown by the scale can be correct or if it cannot.
Constraints
Sample 1:
5
1 2 1 2 2
2 4 1 2 2
4 8 1 2 2
5 8 1 2 2
1 100 1 2 2
0
1
1
1
0
Explanation:
Example case 1: Since the increase in Chef's weight is kg and that is less than the minimum possible increase kg, the scale must be faulty.
Example case 2: Since the increase in Chef's weight is kg, which is equal to the minimum possible increase kg, the scale is showing correct results.
Example case 3: Since the increase in Chef's weight is kg, which is equal to the maximum possible increase kg, the scale is showing correct results.
Example case 4: Since the increase in Chef's weight kg lies in the interval kg, the scale is showing correct results.
Example case 5: Since the increase in Chef's weight is kg and that is more than the maximum possible increase kg, the weight balance must be faulty.
ANSWER