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