def factorization(n): arr = [] temp = n for i in range(2, int(-(-n**0.5 // 1)) + 1): if temp % i == 0: cnt = 0 while temp % i == 0: cnt += 1 temp //= i arr.append([i, cnt]) if temp != 1: arr.append([temp, 1]) return arr N, H = map(int, input().split()) A = list(map(int, input().split())) for i in range(N): if A[i] == 0: print("YES") exit() A[i] = abs(A[i]) for k, v in factorization(H): cnt = 0 for i in range(N): while A[i] % k == 0: A[i] //= k cnt += 1 if cnt < v: print("NO") exit() print("YES")