N,K=map(int,input().split()) A=list(map(int,input().split())) G=0 for a in A: G^=a%(K+1) if G: print("YES") else: print("NO")