n, k = map(int, input().split()) A = list(map(int, input().split())) t = 0 for a in A: t ^= (a%(k+1)) if t == 0: print('NO') else: print('YES')