N, K = gets.split.map(&:to_i) A = gets.split.map(&:to_i) if A.inject(0) { |e, a| e ^= a % (K + 1) } == 0 puts "NO" else puts "YES" end