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