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