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>.
#author: Sushmanth

from sys import stdin
input = stdin.readline
 
inp = lambda : list(map(int,input().split()))

"""

firstly we can fix l the left point
we can maintain pref

"""

class segtree:

    def __init__(self , n , function , bound):

        self.st = [bound] * (2 * n)
        self.size = n
        self.function = function
        self.bound = bound
 
    def update(self , x , value):

        x += self.size

        self.st[x] = value

        while(x > 1):
            
            x >>= 1
            self.st[x] = self.function(self.st[2 * x] , self.st[2 * x + 1])
 
    def query(self , x , y):

        x += self.size
        y += self.size + 1

        ans = self.bound
        while(x < y):

            if(x & 1):
                ans = self.function(ans , self.st[x])

                x += 1

            if(y & 1):

                y -= 1

                ans = self.function(ans , self.st[y])

            x //= 2
            y //= 2

        return ans

def answer():


    st = segtree(n + 2 , min , float('inf'))
    pref = 0
    st.update(0 , pref)


    prefix = [0]
    for i in range(n):
        pref += (a[i] == '(')
        pref -= (a[i] == ')')

        st.update(i + 1 , pref)
        prefix.append(pref)


    ans , count = 0 , 0
    for left in range(1 , n + 1):


        right = left - 1
        l , h = left , n
        while(l <= h):

            mid = (l + h) // 2
            if(st.query(left , mid) >= prefix[left - 1]):
                right = mid
                l = mid + 1
            else:
                h = mid - 1


        if(right < left or prefix[right] != prefix[left - 1]):continue
        if(ans < (right - left + 1)):
            ans = (right - left + 1)
            count = 1
        elif(ans == (right - left + 1)):
            count += 1

 
    if(ans == 0):count = 1
    return [ans , count]
    

for T in range(1):

    a = input().strip()
    n = len(a)

    print(*answer())
