n,h=map(int,input().split()) a=list(map(int,input().split())) ans=1 for i in range(n): ans=ans*a[i]%h print("YES" if ans==0 else "NO")