n, h = map(int, input().split()) A = list(map(int, input().split())) ans = 1 for x in A: ans*=x if ans%h == 0: print("YES") else: print("NO")