from math import gcd N, H = map(int, input().split()) A = list(map(int, input().split())) for a in A: H //= gcd(a, H) print("YES" if H==1 else "NO")