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

Input

The first line of the input file contains a non-empty string, consisting of «(» and «)» characters. Its length does not exceed 106.

Output

Print the length of the longest substring that is a regular bracket sequence, and the number of such substrings. If there are no such substrings, write the only line containing "0 1".

Examples

Input

)((())))(()())


Output

6 2


Input

))(


Output

0 1

Solution (in PYTHON3):

Solution:
class RegularBracket():
    def __init__(self, s):
        self.s = s

    def regular_substring(self):
        st = [-1]*len(self.s)
        cl = [-1]*len(self.s)
        pt = 0

        for i in range(len(self.s)):
            if self.s[i] == '(':
                st[pt] = i
                pt += 1
            else:
                if pt > 0:
                    cl[st[pt-1]] = i+1
                    pt = pt-1
        
        pt = 0
        max_len = 0
        segments = []
        
        while pt < len(self.s):
            if cl[pt] > 0:
                start_pt = pt
                while pt < len(self.s) and cl[pt] > 0:
                    pt = cl[pt]
                segments.append((start_pt, pt))
                max_len = max(max_len, pt-start_pt)
            pt += 1
        max_cnt = 0
        
        for st, ed in segments:
            if ed-st == max_len:
                max_cnt += 1
        
        if max_len == 0:
            print(max_len, 1)
        else:
            print(max_len, max_cnt)

s = input().strip(' ')
rg = RegularBracket(s)
rg.regular_substring()