# Practice on Toph

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

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

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.)

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** ≤ 10^{18}).

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

Input | Output |
---|---|

2 4 5 2 4 | yes no |

72% Solution Ratio

codesframeEarliest,

samnoon_baiustFastest, 0.0s

rummanrakib11Lightest, 0 B

touhidurShortest, 103B

Login to submit