from collections import defaultdict def pf(num): dic = defaultdict(int) i = 2 while num%i == 0: num //= i dic[i] += 1 i = 3 while i*i <= num: while num%i == 0: num //= i dic[i] += 1 i += 2 if num != 1: dic[num] += 1 return dic n,k = map(int, input().split()) alist = list(map(int, input().split())) kdic = pf(k) que = [] for key, val in kdic.items(): que.append(pow(key, val)) for a in alist: nq = [] while que: v = que.pop() if a % v == 0: a //= v else: nq.append(v) que = nq if len(que) == 0: print("Yes") else: print("No")