import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import static java.lang.System.in; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(in)); String S = reader.readLine(); int left = 0; int right = 0; for (int i = 0; i < S.length(); i++) { if(S.charAt(i) == ')') { if(S.charAt(i-1) =='*') { left+=1; } else { right+=1; } } } System.out.println(left +" " + right); } }