from math import gcd n, h = map(int, input().split()) A = list(map(int, input().split())) res = 1 for i in range(n): res = (res * A[i]) // gcd(res, A[i]) if res % h == 0: print("YES") else: print("NO")