Time limit
2s
Memory limit
128 MB
Let X be an integer. If there are integers a_1, a_2, ..., a_n such that X = a_1 * a_2 * ... * a_n and Y = a_1 + a_2 + ... + a_n, then X is said to be able to transform into Y.
Also, if X can transform into some number Y, and Y can transform again into Z, then X can transform into Z.
Given two integers A and B, determine whether A can transform into B.
The first line contains the number of test cases T. 1 <= T <= 100.
Each test case contains two integers A and B on one line. They satisfy -2^31 <= A, B <= 2^31 - 1.
For each test case, print yes on one line if A can transform into B; otherwise print no.
Since 6 = 2 * 3 and 2 + 3 = 5, 6 can transform into 5.