N,H = map(int,input().split()) A = list(map(int,input().split())) f1 = 0 f2 = 0 for i in range(N): if A[i]%H == 0: f1 += 1 if A[i] == 0: f2 += 1 break if f1 >= 1 and f2 == 0: print("YES") elif f1 == 0 and f2 == 0: print("NO") else: print("NO")