def gcd(x, y): if y == 0: return x else: return gcd(y,x%y) N, H = map(int,input().split()) A = map(int,input().split()) for Ai in A: H /= gcd(Ai,H) if H ==1: ans = 'YES' break else: ans = 'NO' print(ans)