def gcd(x, y): while min(x, y) > 0: x, y = max(x, y), min(x, y) x %= y return max(x, y) (n, h), a = [[*map(int, input().split())] for _ in range(2)] for ai in a: if ai == 0: h = 1 break h //= gcd(h, ai) print("YES" if h == 1 else "NO")