Question
Chirag's Task

Chirag has two integers 𝐴 and B (A ≤ B). Chirag can choose any non-negative integer X and add them to both A and B. Find whether it is possible to make A a divisor of B.

Input
The first line of input will contain a single integer T, denoting the number of test cases.
Each test case consists of two integers A and B.

Constraints
1 ≤ T ≤ 105
1 ≤ A ≤ B ≤ 109
Output
For each test case, output "YES" (without quotes) if it is possible to make A a factor of B, NO otherwise.
Example
Input
2
3 6
4 14
Output
YES
YES
Explanation
Test case 1: We can choose X = 0 and add them to 3 and 6. Thus, 3 is a factor of 6.
Test case 2: We can choose X = 1 and add them to 4 and 14. Thus, 4 + 1 = 5 is a factor of
14 + 1 = 15.

Online