subsequence-product
Source: hackerearth
Difficulty: EASY

Our Chotu is very superstitious, especially during exams and worldcups :p 
India is playing Australia to secure a place in the semifinals. Chotu is a die hard fan of Indian Cricket Team, so he wants to please the Bytelandian god Chaman to help India win.

In order to please Chaman Chotu has to offer the "spiritual" array A in his shrine. A spiritual array is an array which contains a subsequence, such that the product of each number in the subsequence is divisible by the holy number H.
Example - If H = 10, A = {2, 6, 15} is an spiritual array as there is subsequence {2, 15} whose product (= 30) is divisible by H, whereas A = {2, 6, 14} is not a spiritual array.

Chotu has an array, but he cannot tell whether the array is spiritual or not. Help Chotu.

Input
First line of input contains an integer T denoting number of test cases.
Each test case comprise of two lines.
First line contains an integer N and H denoting the size of the array and the holy number. 
Second line contains N numbers denoting the array A.
 
Output
For each test case print "YES"(without quotes) if the array is spiritual else  print "NO". 

Constraints
1 ≤ T ≤ 100
1 ≤ H ≤ 10^8
1 ≤ N ≤ 10^4
1 ≤ Ai  ≤ 10^8 

SAMPLE INPUT
2
3 10
2 6 15
3 10
2 6 14

SAMPLE OUTPUT
YES
NO

Explanation

For the first test case, the product of subsequence {2, 15} is divisible by 10, while in 2nd test case, there is no such subsequence.