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