Two intervals of positive integers and are given. Determine whether the product is divisible by the product .
Input Specification
The first line contains a single integer , the number of independent test cases.
Each of the following lines contains four positive integers , , , .
Output Specification
Output lines in total. For the test case, output DA
if divides , and output NE
otherwise.
Sample Input 1
2
9 10 3 6
2 5 7 9
Sample Output 1
DA
NE
Sample Explanation 1
We have and . The answer is DA
because divides .
We calculate , which doesn't divide . Thus the second answer is NE
.
Sample Input 2
6
1 2 3 4
1 4 2 3
2 3 1 4
1 3 2 4
19 22 55 57
55 57 19 22
Sample Output 2
DA
NE
DA
DA
DA
DA
Comments