N,H=map(int,input().split())
pa=[int(s)%H for s in input().split()]
m=1
for n in pa:
    m=m*n%H
print(["YES","NO"][m>0])