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