Given two integers, see if one of them is the factor of other or not

(second one could be factor of first or the other way).

The first line of the input consist of number of test cases ‘t’. Each test case follows two space separated integers in each line. Print YES or NO as output.

SAMPLE INPUT:

4

25 5

0 3

1 22

5 76

OUTPUT:

YES

YES

YES

NO

Leave a Reply