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>.
from sys import maxsize, stdout, stdin,stderr
mod = int(1e9 + 7)

def I(): return int(stdin.readline())
def lint(): return [int(x) for x in stdin.readline().split()]
def S(): return input().strip()
def grid(r, c): return [lint() for i in range(r)]
from collections import defaultdict, Counter
import math
import bisect
from itertools import groupby
def gcd(a,b): 
    while b:
        a %= b
        tmp = a
        a = b
        b = tmp
    
    return a

def lcm(a,b): 
    return a / gcd(a, b) * b

def check_prime(n):
    for i in range(2, int(n ** (1 / 2)) + 1):
        if not n % i:
            return False
    return True
def Bs(a, x):
    i=0
    j=0
    left = 0
    right = len(a)
    flag=False
    while left<right:
        
        mi = (left+right)//2
        #print(mi,a[mi],x)
        
        if a[mi]<=x:
            left = mi+1
            i+=1
            
        else:

            right = mi
            j+=1
        #print(left,right,"----")
    #print(i-1,j)
    if left>0 and a[left-1]==x:
        return i-1, j
    else:
        return -1, -1



s = input()

j=None
ans=0
o=0
d = defaultdict(lambda: 0)
for i in range(len(s)):
    if s[i]=="(":
        if o==0:
            
            j=i
            ans=0
        o+=1
    else:
        if o>0:
            ans+=2
            o-=1
            if o==0:
                d[i]=ans+d[j-1]
        else:
            o=0
            ans=0
d=list(d.values())
if len(d)==0:
    m=0
else:
    m= max(d)
if m==0:
    print(0,1)
else:
    print(m,Counter(d)[m])
    
