n, h = map(int, input().split()) b = 1 for a in map(int, input().split()): b *= a b %= h if b: print('NO') else: print('YES')