n,K=map(int,input().split()) a=list(map(int,input().split())) from math import gcd for i in range(n): a[i]=gcd(a[i],K) g=1 for v in a: g=(g*v)//gcd(g,v) print(["No","Yes"][g%K==0])