import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); int n = s.length(); int left = 0; int right = 0; for(int i = 0 ; i < n - 5; i += 5) { if(s.substring(i, i + 5).equals("(^^*)")) { left++; } else { right++; } } System.out.println(left + " " + right); } }