n, a = gets.split.map(&:to_i) xs = gets.split.map(&:to_f) avg = xs.inject(:+) / n puts a == avg ? 'YES' : 'NO'