import java.util.Scanner; public class Main{ private static Scanner sc=new Scanner(System.in); public static void main(String args[])throws Exception{ String s[]=sc.nextLine().replaceAll("\\)",")/").split("/"); String a[]={"(^^*)","(*^^)"}; int left=0,right=0; for(String element:s){ if(element.equals(a[0])==true){ left++; }else if(element.equals(a[1])==true){ right++; } }System.out.println(left+" "+right); } }