N,H=map(int,input().split()) A=list(map(int,input().split())) from math import gcd for a in A: H//=gcd(a,H) if H==1: print("YES") else: print("NO")