N,H=map(int,input().split()) a=1 for i in list(map(int,input().split())): a*=i a%=H print("NO" if a else "YES")