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

Solution:
#include <bits/stdc++.h>
using namespace std;
const long long int maxn = 1e5 + 5;
const long long int inf = 1e9;
const long double PI = acos(-1);
void yes() { cout << "YES"; }
void no() { cout << "NO"; }
long long int pmod(long long int a, long long int mod = 1000000007) {
  return ((a) % mod + mod) % mod;
}
long long int cel(long long int x1, long long int y1) {
  if ((x1) <= 0) {
    return (x1) / (y1);
  }
  return (((x1) / (y1)) + (((x1) % (y1)) != 0));
}
bool isprime(long long int n) {
  for (long long int i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  return ((a / gcd(a, b)) * b);
}
long long bp(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
long long bpm(long long a, long long b, long long m = 1000000007) {
  if (a >= m) a %= m;
  long long res = 1;
  while (b > 0) {
    if (b & 1) res *= a;
    if (res >= m) res %= m;
    a *= a;
    if (a >= m) a %= m;
    b >>= 1;
  }
  if (res >= m) res %= m;
  return res;
}
string vow = "aeiou";
const int dr4[] = {-1, 0, 1, 0};
const int dc4[] = {0, 1, 0, -1};
const int drk[] = {-1, 0, 1, 0, -1, -1, 1, 1};
const int dck[] = {0, 1, 0, -1, -1, 1, -1, 1};
const int drh[] = {-2, -2, -1, -1, 1, 1, 2, 2};
const int dch[] = {1, -1, 2, -2, 2, -2, 1, -1};
void solve(int tc) {
  string s;
  cin >> s;
  int n = ((s).size());
  map<int, int> mp;
  int mxlen = 0;
  int sum = 0;
  vector<int> dp(n, 0);
  mp[0] = n;
  for (long long int i = n - 1; i >= 0; i--) {
    sum += (s[i] == '(' ? 1 : -1);
    if (s[i] == '(' && mp.count(sum)) {
      dp[i] = mp[sum] - i;
      if (mp[sum] < n && s[mp[sum]] == '(') dp[i] += dp[mp[sum]];
      mxlen = max(mxlen, dp[i]);
    }
    mp[sum] = i;
  }
  if (mxlen == 0) {
    cout << "0 1";
    return;
  }
  int cnt = 0;
  for (long long int i = 0; i < n; i++)
    if (dp[i] == mxlen) cnt++;
  cout << mxlen << " " << cnt;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie();
  cout.tie();
  ;
  int t = 1;
  for (long long int i = 1; i < t + 1; i++) {
    solve(i);
    cout << "\n";
  }
  return 0;
}