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