from math import gcd n,k = map(int, input().split()) alist = list(map(int, input().split())) alist = [gcd(a, k) for a in alist] l = 1 for a in alist: g = gcd(a,l) l = l*a//g if l % k == 0: print("Yes") else: print("No")