N,H=map(int,input().split()) A=list(map(int,input().split())) X=1 for i in range(N): X=X*A[i]%H if X: print('NO') else: print('YES')