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;
bool isPrime[1000001];
vector<long long> sieve() {
  memset(isPrime, true, sizeof(isPrime));
  for (long long i = 2; i * i < 1000001; i++) {
    if (isPrime[i]) {
      for (long long j = i * 2; j < 1000001; j += i) isPrime[j] = false;
    }
  }
  vector<long long> ans;
  ans.push_back(2);
  for (long long i = 3; i < 1000001; i += 2) {
    if (isPrime[i]) ans.push_back(i);
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) {
    string s;
    cin >> s;
    stack<long long> st;
    map<long long, long long> m;
    st.push(-1);
    for (long long i = 0; i < s.length(); i++) {
      if (s[i] == '(')
        st.push(i);
      else {
        st.pop();
        if (st.empty()) st.push(i);
        if (i - st.top() > 1) m[i - st.top()]++;
      }
    }
    if (m.size() == 0) {
      cout << 0 << " " << 1;
    } else {
      auto it = m.end();
      it--;
      cout << it->first << " " << it->second;
    }
  }
  return 0;
}