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