def factorization(n): arr = [] temp = n i=2 while i*i<=n: if temp%i==0: cnt=0 while temp%i==0: cnt+=1 temp //= i arr.append([i, cnt]) i+=1 if temp!=1: arr.append([temp, 1]) return arr from collections import defaultdict N,K=map(int,input().split()) A=list(map(int,input().split())) fk=factorization(K) dic=defaultdict(int) for i in range(N): for a,b in factorization(A[i]): dic[a]=max(dic[a],b) for a,b in fk: if b>dic[a]: print('No') exit(0) print('Yes')