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 sys,os,io
# input = sys.stdin.readline

PI = 3.141592653589793238460
INF =  float('inf')
MOD  = 1000000007
# MOD = 998244353


def bin32(num):
    return '{0:032b}'.format(num)

def add(x,y):
    return (x+y)%MOD

def sub(x,y):
    return (x-y+MOD)%MOD

def mul(x,y):
    return (x*y)%MOD

def gcd(x,y):
    if y == 0:
        return x
    return gcd(y,x%y)

def lcm(x,y):
    return (x*y)//gcd(x,y)

def power(x,y):
    res = 1
    x%=MOD
    while y!=0:
        if y&1 :
            res = mul(res,x)
        y>>=1
        x = mul(x,x)
        
    return res
        
def mod_inv(n):
    return power(n,MOD-2)

def prob(p,q):
    return mul(p,power(q,MOD-2))    
  
def ii():
    return int(input())

def li():
    return [int(i) for i in input().split()]

def ls():
    return [i for i in input().split()]


s = input()
n = len(s)

st = 0
pk = 0
ans = 0
cnt = 0
s += ')'
for i in s:
    if i == '(':
        st+=1
        pk+=1
        pk = max(pk , st)
    else:
        if st > 0 :
            st-=1
        else:
            ans = max(ans , 2 * pk)
            pk = 0
st = 0
pk = 0
for i in s:
    if i == '(':
        st+=1
        pk+=1
        pk = max(pk , st)
    else:
        if st > 0 :
            st-=1
        else:
            if 2*pk == ans:
                cnt+=1
            pk = 0

if ans == 0:
    print(0,1)
    exit(0)
print(ans , cnt )