import math N, H = map(int, input().split()) A = list(map(int, input().split())) for a in A: X = math.gcd(H, a) print(['NO', 'YES'][X == 1])