n,h = map(int, input().split()) A = list(map(int, input().split())) import math def factorize(n): d = {} temp = int(math.sqrt(n))+1 for i in range(2, temp): while n%i== 0: n //= i if i in d: d[i] += 1 else: d[i] = 1 if d == {}: d[n] = 1 else: if n in d: d[n] += 1 elif n != 1: d[n] =1 return d d = factorize(h) from collections import defaultdict c = defaultdict(lambda:0) for a in A: for k in d.keys(): cnt = 0 while a%k == 0: a //= k cnt += 1 c[k] += cnt #print(c) #print(d) for k, v in c.items(): if d[k] > v: print('NO') exit() else: print('YES')