#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
const int N=10000010;
string str;
int f[N];
int ans=0;
int cnt=1;
int main()
{
cin>>str;
for(int i=1;i<str.size();i++)
{
if(str[i]=='(') continue;
else
{
if(str[i]==')' && str[i-f[i-1]-1]=='(')
{
f[i]=f[i-1]+2+f[i-f[i-1]-2];
if(f[i]==ans) cnt++;
if(ans<f[i]) cnt=1,ans=f[i];
}
}
}
cout<<ans<<" "<<cnt;
return 0;
}