chapd_28512
You are given two positive integers – A and B. You have to check whether A is divisible by all the prime divisors of B.

Input
The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows.
For each test case, you are given two space separated integers – A and B.

Output
For each test case, output "Yes" (without quotes) if A contains all prime divisors of B, otherwise print "No".

Constraints

1 ≤ T ≤ 10^4
1 ≤ A, B ≤ 10^18


Example
Input:
3
120 75
128 16
7 8

Output:
Yes
Yes
No


Explanation
Example case 1. In the first case 120 = 2^3*3*5 and 75 = 3*5^2. 120 is divisible by both 3 and 5. Hence, we will print "Yes"
Example case 2. In the second case both 128 and 16 are powers of two. Hence, the answer is "Yes"
Example case 3. In the third case 8 is power of two and 7 is not divisible by 2. So, the answer is "No"
t=input()
while (t):
	a,b=raw_input().split()
	a=eval(a)
	b=eval(b)
	print 'Yes' if (a**65)%b==0 else 'No'
	t-=1
3
120 75
128 16
7 8 3
120 75
128 16
7 11 3
120 137
128 16
7 11 3
53 136
128 16
0 11 3
120 16
128 4
4 4 3
215 16
128 12
6 4 3
82 199
339 16
1 5 3
120 75
184 5
16 18 3
120 75
171 16
0 11 3
53 137
128 16
7 11 3
120 75
184 16
7 11 3
120 137
128 16
1 11 3
53 137
128 16
3 11 3
120 75
184 16
8 11 3
120 137
128 16
2 11 3
53 136
128 16
3 11 3
120 75
184 16
8 18 3
120 16
128 16
2 11 3
120 75
184 16
16 18 3
120 16
128 16
4 11 3
53 136
212 16
0 11 3
120 75
184 16
16 36 3
120 16
128 4
4 11 3
72 136
212 16
0 11 3
153 75
184 16
16 36 3
72 136
212 16
0 5 3
153 75
184 16
3 36 3
215 16
128 4
4 4 3
82 136
212 16
0 5 3
153 75
184 16
3 3 3
215 16
128 8
4 4 3
82 199
212 16
0 5 3
153 75
20 16
3 3 3
215 16
128 8
6 4 3
82 199
212 16
1 5 3
153 29
20 16
3 3 3
153 29
20 16
3 5 3
215 16
20 12
6 4 3
82 199
339 31
1 5 3
153 52
20 16
3 5 3
82 199
598 31
1 5 3
153 52
20 16
3 2 3
82 179
598 31
1 5 3
153 52
20 16
3 4 3
82 162
598 31
1 5 3
153 52
34 16
3 4 3
120 11
128 16
7 8 3
120 75
128 16
7 2 3
120 137
128 16
7 21 3
53 137
128 16
8 11 3
120 75
184 16
0 11 3
120 220
128 16
1 11 3
53 137
236 16
3 11 3
120 75
184 16
8 13 3
120 137
163 16
2 11 3
53 136
128 3
3 11 3
120 75
10 16
8 18 3
120 16
128 16
2 15 3
53 136
195 16
0 11 3
120 16
128 16
8 11 3
53 136
158 16
0 11 3
106 75
184 16
16 36 3
120 16
128 4
6 11 3
72 136
212 2
0 11 3
153 75
184 26
16 36 3
120 16
128 4
1 4 3
72 136
212 16
1 5 3
153 75
200 16
3 36 3
215 16
12 4
4 4 3
82 136
253 16
0 5 3
153 75
184 16
3 2 3
215 16
128 9
4 4 3
82 366
212 16
0 5 3
153 75
20 16
0 3 3
215 27
128 8
6 4 3
82 199
212 16
2 5 3
153 29
20 11
3 3 3
215 16
128 12
10 4 3
82 199
339 13
1 5 3
153 7
20 16
3 5 3
215 16
22 12
6 4 3
82 299
339 31
1 5 3
153 52
20 16
4 5 3
127 199
598 31
1 5 3
153 16
20 16
3 2 3
82 179
598 31
1 6 3
153 52
20 27
3 4 3
82 162
598 38
1 5 3
124 52
34 16
3 4 3
120 11
128 26
7 8 3
167 75
128 16
7 2 3
113 137
128 16
7 21 3
10 137
128 16
8 11 3
1 220
128 16
1 11 3
55 137
236 16
3 11 3
120 75
298 16
8 13 3
120 179
163 16
2 11 3
53 136
128 4
3 11 3
120 75
10 16
6 18 3
120 16
128 16
4 15 3
120 75
134 5
16 18
Yes
Yes
No
 Yes
Yes
No
 No
Yes
No
 No
Yes
Yes
 Yes
Yes
Yes
 No
No
Yes
 No
No
No
 Yes
No
No
 Yes
No
Yes
 No
Yes
No
 Yes
Yes
No
 No
Yes
No
 No
Yes
No
 Yes
Yes
No
 No
Yes
No
 No
Yes
No
 Yes
Yes
No
 Yes
Yes
No
 Yes
Yes
No
 Yes
Yes
No
 No
Yes
Yes
 Yes
Yes
No
 Yes
Yes
No
 No
Yes
Yes
 No
Yes
No
 No
Yes
Yes
 No
Yes
No
 No
Yes
Yes
 No
Yes
Yes
 No
Yes
Yes
 No
Yes
Yes
 No
Yes
Yes
 No
Yes
Yes
 No
Yes
Yes
 No
Yes
No
 No
Yes
Yes
 No
Yes
No
 No
No
Yes
 No
No
No
 No
Yes
No
 No
No
No
 No
Yes
No
 No
No
No
 No
Yes
No
 No
No
No
 No
Yes
No
 No
Yes
No
 Yes
Yes
No
 No
Yes
No
 No
Yes
No
 Yes
Yes
Yes
 No
Yes
No
 No
Yes
No
 Yes
Yes
No
 No
No
No
 No
No
No
 Yes
Yes
No
 Yes
Yes
No
 No
No
Yes
 Yes
Yes
No
 No
Yes
Yes
 No
Yes
No
 Yes
Yes
No
 No
Yes
Yes
 No
No
No
 Yes
Yes
No
 No
Yes
No
 No
Yes
No
 No
Yes
Yes
 No
No
Yes
 No
Yes
No
 No
No
Yes
 No
Yes
Yes
 No
Yes
Yes
 No
Yes
Yes
 No
Yes
No
 No
No
Yes
 No
No
Yes
 No
No
No
 No
Yes
No
 No
No
Yes
 No
No
No
 No
Yes
No
 No
No
No
 No
Yes
No
 No
No
No
 No
No
No
 No
No
No
 No
Yes
No
 No
No
No
 No
Yes
No
 No
Yes
No
 No
Yes
No
 No
Yes
No
 No
Yes
No
 Yes
Yes
No
 No
No
No
 No
Yes
No
 Yes
Yes
Yes
 Yes
Yes
No
 Yes
No
No
