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;
void sc(int& a) { scanf("%d", &a); }
void sc(long long int& a) { scanf("%lld", &a); }
void sc(int& a, int& b) {
  sc(a);
  sc(b);
}
void sc(int& a, int& b, int& c) {
  sc(a);
  sc(b);
  sc(c);
}
void sc(long long int& a, long long int& b) {
  sc(a);
  sc(b);
}
void sc(long long int& a, long long int& b, long long int& c) {
  sc(a, b);
  sc(c);
}
void write(int a) { printf("%d", a); }
void write(long long int a) { printf("%lld", a); }
int a[1000005], c[1000005];
int main() {
  string s;
  int i;
  cin >> s;
  int n = s.size();
  memset(a, -1, sizeof(a));
  memset(c, -1, sizeof(c));
  stack<int> S;
  for (i = 0; i < n; i++) {
    if (s[i] == '(')
      S.push(i);
    else {
      if (!S.empty()) {
        int x = S.top();
        S.pop();
        a[i] = x;
        if (x >= 1)
          c[i] = c[x - 1];
        else
          c[i] = 0;
        if (a[i] != -1 and c[i] == -1) c[i] = a[i];
      }
    }
  }
  int maxx = 0, cnt = 0;
  for (i = 0; i < n; i++)
    if (c[i] != -1) maxx = max(maxx, i - c[i] + 1);
  for (i = 0; i < n; i++)
    if (c[i] != -1)
      if (i - c[i] + 1 == maxx) cnt++;
  if (maxx == 0)
    cout << 0 << " " << 1 << endl;
  else
    cout << maxx << " " << cnt << endl;
}