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>.


s = input()
count = 0
val = 1
start = 0
ans = 0
maxi = 0
maxi1 = 0
val1= 0
countv = 1
for j in range(len(s)):
    
    if s[j] == "(":
        count = count + 1
    else:
        count = count - 1
        if count  != -1:
            val1 = val1 + 1
            
                
    if count == 0:
        if j - start > maxi:
            maxi = j - start + 1
            ans = start
            val = 1
        elif j - start+1 == maxi:
            val =val + 1
        
    if count == -1:
        start = j+1
        count = 0
        if val1 > maxi1:
            maxi1 = val1
            countv = 1
        elif val1 == maxi1:
            countv = countv + 1
        val1 = 0
if count != -1:
    if val1 > maxi1:
        maxi1 = val1
        countv = 1
    elif val1 == maxi1:
        countv = countv + 1
    
        

if maxi1 != 0:    
    print(2*maxi1,end=" ")
    print(countv)
else:
    print(0,end=" ")
    print(1)
