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;
vector<string> split(const string& s, char c) {
  vector<string> v;
  stringstream ss(s);
  string x;
  while (getline(ss, x, c)) v.emplace_back(x);
  return move(v);
}
void err(vector<string>::iterator it) {}
template <typename T, typename... Args>
void err(vector<string>::iterator it, T a, Args... args) {
  cerr << it->substr((*it)[0] == ' ', it->length()) << " = " << a << '\n';
  err(++it, args...);
}
typedef tuple<int, int, int> State;
int dx[] = {0, 1, 0, -1};
int dy[] = {1, 0, -1, 0};
const int N = 1e6 + 5;
const double EPS = 1e-10;
const long long INF = 1e18;
const double PI = acos(-1);
int n, m, k;
int dcmp(double a, double b) { return fabs(a - b) <= EPS ? 0 : a < b ? -1 : 1; }
int c[N], d[N];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  string s;
  cin >> s;
  n = s.size();
  stack<int> st;
  memset(c, -1, sizeof c);
  memset(d, -1, sizeof c);
  int mx = 0, mxcnt = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == ')') {
      if (!st.empty()) {
        d[i] = st.top();
        st.pop();
        if (c[d[i] - 1] != -1)
          c[i] = c[d[i] - 1];
        else
          c[i] = d[i];
      }
    } else {
      st.push(i);
    }
    if (c[i] != -1) {
      if (mx < i - c[i] + 1) {
        mx = i - c[i] + 1;
        mxcnt = 0;
      }
      if (mx == i - c[i] + 1) mxcnt++;
    }
  }
  if (mx == 0) mxcnt = 1;
  cout << mx << " " << mxcnt;
}