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