n,h = map(int,input().split()) A = list(map(int,input().split())) dic = {} s = set() now = h for i in range(2,int(h**0.5)+1): if now%i: continue dic[i] = 0 s.add(i) while now % i == 0: now //= i dic[i] += 1 if now != 1: dic[now] = 1 s.add(now) for a in A: now = a for c in s: if now%c: continue while now%c == 0: now //= c dic[c] -= 1 if dic[c] <= 0: s.remove(c) if len(s) != 0: print("NO") else: print("YES")