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