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")