def get_prime_factors(h):
    factors = {}
    while h % 2 == 0:
        factors[2] = factors.get(2, 0) + 1
        h = h // 2
    i = 3
    while i * i <= h:
        while h % i == 0:
            factors[i] = factors.get(i, 0) + 1
            h = h // i
        i += 2
    if h > 1:
        factors[h] = 1
    return factors

n, h = map(int, input().split())
a_list = list(map(int, input().split()))

if h == 1:
    print("YES")
    exit()

if any(x == 0 for x in a_list):
    print("YES")
    exit()

factors = get_prime_factors(h)

flag = True
for p, required in factors.items():
    total = 0
    for a in a_list:
        current = abs(a)
        cnt = 0
        while current % p == 0:
            cnt += 1
            current = current // p
        total += cnt
        if total >= required:
            break
    if total < required:
        flag = False
        break

print("YES" if flag else "NO")