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 PYTHON):

Solution:
s = raw_input()
stack = []
corr_pos = {}
res_pos = {}
for i in range(len(s)):
	if s[i] == '(':
		stack.append(i)
	elif s[i] == ')':
		if stack != []:
			corr_pos[i] = stack.pop()
			if corr_pos[i] == 0:
				res_pos[i] = corr_pos[i]
			elif corr_pos[i] > 0 and s[corr_pos[i]-1] == ')' and res_pos[corr_pos[i]-1] != -1:
				res_pos[i] = res_pos[corr_pos[i]-1]
			else:
				res_pos[i] = corr_pos[i]
		elif stack == []:
			corr_pos[i] = -1
			res_pos[i] = -1

orign_poss = res_pos.keys()
max_lenth = 0
count = 0
for orign_pos in orign_poss:
	if res_pos[orign_pos] >= 0:
		temp_len = orign_pos - res_pos[orign_pos] + 1
		if temp_len > max_lenth:
			max_lenth = temp_len
			count = 1
		elif temp_len == max_lenth:
			count += 1

if max_lenth == 0:
	print 0, 1
else:
	print max_lenth, count
# print corr_pos
# print res_pos