using System; namespace yukicoder { class Program { static void Main(string[] args) { var str = Console.ReadLine(); string[] strings = new string[str.Length]; int L = 0 , R = 0; for(int i = 0; i < str.Length; i++) { if (str.Substring(0, 1) == "#" || str.Substring(1, 1) == "#" || str.Substring(2, 1) == "#" || str.Substring(3, 1) == "#" || str.Substring(4, 1) == "#") { Console.WriteLine(L + " " + R); break; } else if(str.Substring(i, 5) == "(^^*)") { L++; } else if(str.Substring(i, 5) == "(*^^)") { R++; } else if(str.Substring(i + 4, 1) == "#") { Console.WriteLine(L + " " + R); break; } } } } }