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)] flg = True for ai in a: if ai == 0: flg = False h //= gcd(h, ai) print("YES" if h == 1 and flg else "NO")