n,m=[int(s)for s in input().split()] a=[int(s)for s in input().split()] A=1 for i in range(n): A*=a[i] if A%m==0: print("YES") else: print("NO")