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