using System; using System.Linq; using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; class Solution { static void Main(string[] args) { string s = Console.ReadLine(); s = s.Remove(s.Length - 1); string[] ss = s.Split('('); int a, b; a = b = 0; foreach (string st in ss) { switch (st) { case "^^*)": a++; break; case "*^^)": b++; break; } } Console.WriteLine($"{a} {b}"); } }