N,H=map(int,input().split()) temp=1 A=list(map(int,input().split())) for a in A: temp*=a temp%=H print("NO" if temp else "YES")