Two points and are said to be integer multiples if there is an integer such that = or = . For example,
- and are integer multiples, since for ,
- and are also integer multiples
- and are not integer multiples, since there is no such that and vice versa.
Given two points, figure out if they are integer multiples of each other.
Input Specification
The first line of input provides the number of test cases, . test cases follow. Each test case consists of two lines. Each line contains two integers , which represent a point .
Output Specification
For each test case, your program should output one line containing YES
if the two
points are integer multiples, or NO
otherwise.
Sample Input
4
1 2
-4 -8
3 7
9 21
26 2
13 1
0 7
1 7
Sample Output
YES
YES
YES
NO
Explanation for Sample
Looking at the first three test cases in order, we note that:
Comments