N, H = map(int, input().split()) A = list(map(int, input().split())) def f(): x = 1 for a in A: x = (x * a) % H if x == 0: return True return x == 0 if f(): print('YES') else: print('NO')