moji = input() moji = moji[1:-2] faces = moji.split(")(") L=0 R=0 for i in faces: if i=='^^*': L+=1 elif i=='*^^': R+=1 print(L,R)