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