N, H = map(int, input().split()) ans = 1 for a in map(int, input().split()): ans *= a ans %= H if ans == 0: print('YES') exit() print('NO')