import math
N, H = map(int, input().split())
A = list(map(int, input().split()))
G = 1
for a in A:
    G *= math.gcd(a, H)
    G %= H
    if G%H==0:
        print("YES")
        exit()
print("NO")