count = 0
ok = true
gets.to_i.times do
  p, x = gets.chomp.split
  case p
    when "("
      count += x.to_i
    else
      count -= x.to_i
  end
  ok = false if count < 0
end
ok = false if count != 0
puts ok ? "Yes" : "No"