def factorization(n): arr = [] temp = n for i in range(2, int(-(-n**0.5//1))+1): if temp%i==0: cnt=0 while temp%i==0: cnt+=1 temp //= i arr.append([i, cnt]) if temp!=1: #最後に残ったもの(もしくは素数)の場合はここ arr.append([temp, 1]) if arr==[]: #1の場合はここ arr.append([n, 1]) return arr N,H = map(int,input().split()); MOD = pow(10,9)+7 A = list(map(int,input().split())) B = factorization(H) #print(B) for i in range(N): a = A[i] for j in range(len(B)): while a%B[j][0] == 0 and B[j][1] > 0: a = a//B[j][0] B[j][1] -= 1 Flag = True for x in B: if x[1] != 0: Flag = False break if Flag: print("YES") else: print("NO")