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>.
from sys import stdin
# input=stdin.buffer.readline
input=lambda : stdin.readline().strip()
lin=lambda :list(map(int,input().split()))
iin=lambda :int(input())
main=lambda :map(int,input().split())
from math import ceil,sqrt,factorial,log
from collections import deque
from bisect import bisect_left
mod=998244353
mod=1000000007
def gcd(a,b):
	a,b=max(a,b),min(a,b)
	while a%b!=0:
		a,b=b,a%b
	return b
def moduloinverse(a):
	return(pow(a,mod-2,mod))
def solve(we):
	s=input()
	d={}
	ini=0
	z=0
	l=set()
	n=len(s)-1
	for i in range(len(s)):
		if s[i]=='(':
			z+=1
		else:
			z-=1
		if z==0:
			l.add((min(i,ini),max(i,ini)))
		elif z<0:
			z=0
			ini=i+1
	if z==0 and ini<=n:
		l.add((min(n,ini),max(n,ini)))
	ini=len(s)-1
	z=0
	for i in range(len(s)-1,-1,-1):
		if s[i]=='(':
			z+=1
		else:
			z-=1
		if z==0:
			l.add((min(i,ini),max(i,ini)))
		elif z>0:
			z=0
			ini=i-1
	if z==0 and ini>=0:
		l.add((min(0,ini),max(0,ini)))
	# print(l)
	ma=0
	d[0]=1
	for i in l:
		t=i[1]-i[0]+1
		if t not in d:
			d[t]=0
		d[t]+=1
		ma=max(ma,t)
	print(ma,d[ma])	

qwe=1
# qwe=iin()
for _ in range(qwe):
	solve(_+1)