n, k = map(int, input().split()) a = list(map(int, input().split())) g = 0 for m in a: g ^= m % (k + 1) print('NO' if g == 0 else 'YES')