import numpy as np N,H = map(int,input().split()) A = list(map(int,input().split())) d = np.array(A) S = d.prod() if S%H == 0: print("YES") else: print("NO")