import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines from operator import xor from functools import reduce N,K,*A = map(int,read().split()) x = reduce(xor,(x % (K+1) for x in A)) answer = 'YES' if x else 'NO' print(answer)