s = str(input()) l = 0 r = 0 n = len(s) for i in range(n): if s[i] == ')': if s[i-1] == '*': l += 1 else: r += 1 print(l, r)