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