N,H = map(int,input().split()) A = list(map(int,input().split())) seki = 1 for i in A: seki *=i if seki%H == 0: print("YES") else: print(("NO"))