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;
inline void in() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
}
const long long inf = INT_MAX / 2, infl = LLONG_MAX / 2,
                N = (long long)5e5 + 10, mod = (long long)1e9 + 7;
template <class T, class U>
void amax(T &a, U b) {
  if (a < b) a = b;
}
template <class T, class U>
void amin(T &a, U b) {
  if (b < a) a = b;
}
int main() {
  in();
  string s;
  cin >> s;
  int n = ((int)(s).size());
  stack<int> st;
  vector<int> d(n, -1), c(n, -1);
  for (int(i) = 0; (i) <= (int)(n - 1); ++(i)) {
    if (s[i] == '(') {
      st.push(i);
    } else {
      if (!st.empty()) {
        d[i] = c[i] = st.top();
        st.pop();
        if (c[i] - 1 >= 0 && s[c[i] - 1] == ')' && c[c[i] - 1] != -1) {
          c[i] = c[c[i] - 1];
        }
      }
    }
  }
  int ans = 0;
  for (int(i) = 0; (i) <= (int)(n - 1); ++(i)) {
    if (c[i] != -1) {
      amax(ans, i - c[i] + 1);
    }
  }
  int cnt = 0;
  for (int(i) = 0; (i) <= (int)(n - 1); ++(i)) {
    if (c[i] != -1 && i - c[i] + 1 == ans) cnt++;
  }
  ans ? cout << ans << " " << cnt : cout << "0 1\n";
}