def main(): S = input() print(S.count("*)"), S.count("(*")) if __name__ == "__main__": main()