N,H=map(int,input().split())
A=list(map(int,input().split()))

X=1
for a in A:
    X*=a
    X%=H

if X==0:
    print("YES")
else:
    print("NO")