N = gets.to_i S = gets.chomp puts (S.count(?() == S.count(?))) ? "Yes" : "No"