using System; using System.Text; using System.Linq; namespace ConsoleApp11 { class Program { static void Main(string[] args) { string S = Console.ReadLine(); int countr = 0; int countl = 0; for(int i = 0; i < S.Length - 4; i += 5) { if (S[i] == '(' && S[i + 1] == '^' && S[i+2] == '^' && S[i+3] == '*' && S[i+4] == ')') { countl++; } else if(S[i] == '#') { break; } else { countr++; } } Console.Write(countl + " "); Console.WriteLine(countr); } } }