N, H = map(int, input().split()) A = list(map(int, input().split())) X = 1 for a in A: X*=abs(a) X%=H if X==0: print("YES") exit() print("NO")