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 int N = 2e5 + 10;
long long int M = 1e9 + 7;
long long int MOD = 998244353;
const double PI = 3.141592653589793238460;
bitset<N> bs;
long long int power(long long int a, long long int b) {
  long long int res = 1;
  if (a == 0) return 0;
  if (a == 1) return 1;
  for (; b > 0; b >>= 1) {
    if (b & 1) {
      res = (res * a);
      if (res > M) res %= M;
    }
    a = (a * a);
    if (a > M) a = a % M;
  }
  return res;
}
int main() {
  string s;
  cin >> s;
  int n = s.length();
  stack<int> st;
  int maxc = 0, cnt = 0;
  st.push(-1);
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      st.push(i);
    else {
      st.pop();
      if (st.empty())
        st.push(i);
      else {
        int ans = i - st.top();
        if (ans == cnt)
          maxc++;
        else if (ans > cnt) {
          cnt = ans;
          maxc = 1;
        }
      }
    }
  }
  if (cnt)
    cout << cnt << " " << maxc;
  else
    cout << "0 1";
}