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) dic2 = {} for i in s: dic2[i] = 0 for a in A: now = a for c in s: while now%c == 0: now //= c dic2[c] += 1 for c in s: if dic[c] > dic2[c]: print("NO") exit() print("YES")