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