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