n, k = gets.split.map(&:to_i)
a = gets.split.map{|i| i.to_i % (k + 1) }
puts a.inject(:^) == 0 ? 'NO' : 'YES'