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:
import sys
import math
 
t = sys.stdin.read().split("\n")
if (len(t) > 1):
    t.pop(-1)
t = t[0]

base = t
index = 0
current_length = 0
max_length = 0
count = 0
pares = 0
puedo_sumar = [False for x in t]
last_index = []

if (True):
    o = 0
    index = 0
    #print("=========================")
    #print("String:" + string)
    for char in t:
        if char == "(":
            o+=1
            puedo_sumar[index] = False;
            last_index += [index]
        elif char == ")":
            if o>0:
                o-=1
                puedo_sumar[index] = True;
                puedo_sumar[last_index.pop(-1)] = True;
        index +=1

count = 0
for value in puedo_sumar:
    if not value:  
        current_length = 0
    else:
        current_length += 1

    if current_length > max_length:
        max_length = current_length
        count=1
    elif current_length == max_length:
        count+=1
   

if (max_length == 0):
    print("0 1")
else:
    print("{0} {1}".format(max_length, count))