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 'NO')