import collections import math def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a N,K = map(int, input().split()) A = list(map(int, input().split())) v = 1 for a in A: gc = math.gcd(a,K) PC = collections.Counter(prime_factorize(gc)) for k,v in PC.items(): if K%(k**v)==0 and K%(k**(v+1))!=0: K//=(k**v) if K==1: print('Yes') else: print('No')