N,H=map(int,input().split()) A=list(map(int,input().split())) prd=1 while A: prd=prd*A.pop()%H if prd==0: print("YES") else: print("NO")