S = input().split(')') right = 0 left = 0 for i in range(len(S) - 1): if S[i] == '(^^*': left += 1 else: right += 1 print(left, right)