This is yet another problem dealing with regular bracket sequences.

We should remind you that a bracket sequence is called regular, if by inserting «+» and «1» into it we can get a correct mathematical expression. For example, sequences «(())()», «()» and «(()(()))» are regular, while «)(», «(()» and «(()))(» are not. 

You are given a string of «(» and «)» characters. You are to find its longest substring that is a regular bracket sequence. You are to find the number of such substrings as well.
The first line of the input file contains a non-empty string, consisting of «(» and «)» characters. Its length does not exceed 10<sup class="upper-index">6</sup>.
import math as mt 
import sys,string,bisect
input=sys.stdin.readline
from collections import deque,defaultdict
L=lambda : list(map(int,input().split()))
Ls=lambda : list(input().split())
M=lambda : map(int,input().split())
I=lambda :int(input())
d=defaultdict(int)
def valid(s):
    l=[]
    for i in range(len(s)):
        if(s[i]=="("):
            l.append("(")
        if(len(l)>0 and s[i]==")"):
#            print(l)
            l.pop()
#            print(l)
        elif(len(l)==0 and s[i]==")"):
            return 1
        if(len(l)==0):
            d[i+1]+=1
    if(len(l)==0):
        return 0
    else:
        return 2


s=input().strip()
for j in range(len(s)):
    valid(s[j::])
    
#print(d)       
if(len(d)==0):
    print(0,1)
else:
    print(max(d.keys()),d[max(d.keys())])

        
