n,k=map(int,input().split()) a=list(map(int,input().split())) g=0 for i in range(n): g^=a[i]%(k+1) print(["NO","YES"][g>0])