import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); int left = 0; int right = 0; for(int i = 0; i < s.length() - 1; i++) { if((s.charAt(i) == '*') && (s.charAt(i + 1) == ')')) left++; if((s.charAt(i) == '(') && (s.charAt(i + 1) == '*')) right++; } System.out.println(left + " " + right); } }