words = input() left = words.count("*)") right = words.count("(*") print(str(left) + ' ' + str(right))