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