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:
from __future__ import print_function # for PyPy2
from collections import Counter, OrderedDict
from itertools import permutations as perm
from collections import deque
from sys import stdin
from bisect import *
from heapq import *
from math import *

g   = lambda : stdin.readline().strip()
gl  = lambda : g().split()
gil = lambda : [int(var) for var in gl()]
gfl = lambda : [float(var) for var in gl()]
gcl = lambda : list(g())
gbs = lambda : [int(var) for var in g()]
mod = int(1e9)+7
inf = float("inf")

s = g()
stack = []
ma, f = 0, 1

for ch in s:
	# print(stack, ch)
	if ch == ")" and stack :#closing
		if stack[-1]=="(":
			stack.pop();stack.append(2)
		elif stack[-1] == ")":
			stack.append(ch)
		elif len(stack) > 1 :
			if stack[-2] == "(":
				v = stack.pop()
				stack.pop()
				stack.append(v+2)
			else:
				stack.append(ch)
		else:
			stack.append(ch)

		if len(stack) > 1 and type(stack[-1]) == int :
			while len(stack) > 1 and type(stack[-2]) == int:
				stack[-2] += stack[-1]
				stack.pop()

	else:
		stack.append(ch)

# print(stack)

for ch in stack:
	if type(ch) == int and ch >= ma:
		if ch > ma:
			ma = ch;f = 1
		else:
			f += 1

# print(stack)

print(ma, f)