Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

GCD and LCM

Limits 1s, 512 MB

You will be given two integers A, B. If A × B (product of A and B) is equal to LCM(A, B) then you have to print “yes” otherwise “no” without quotes.

(LCM means Lowest Common Multiple.)

Input

The first line of the input contains T (1 ≤ T ≤ 20) the number of test cases. Each of the following T lines contain two numbers A and B (1 ≤ A, B ≤ 1018).

Output

For each test case print the answer on a line “yes” or “no” as described above.

Sample

InputOutput
2
4 5
2 4
yes
no

    Discussion

    Statistics


    72% Solution Ratio

    codesframeEarliest, Nov '17

    samnoon_baiustFastest, 0.0s

    rummanrakib11Lightest, 0 B

    touhidurShortest, 103B

    Submit

    Login to submit

    Related Contests

    MU Tech Fest Programming Contest 2017 (Junior) Ended at 2017-11-16 09:05:00 +0000 UTC
    Replay of MU Tech Fest Programming Contest 2017 (Junior) Ended at 2017-11-24 15:30:00 +0000 UTC