import collections def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a N,K = map(int, input().split()) A = list(map(int, input().split())) C = collections.Counter(prime_factorize(K)) for k,v in C.items(): for a in A: if a%(k**v)==0: break else: print('No') exit() print('Yes')