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