n, a = gets.chomp.split.map &:to_i xs = gets.chomp.split.map &:to_i if xs.sum.to_f / xs.size == a puts "YES" else puts "NO" end