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;
template <class T>
T power(T a, T b) {
  T x;
  if (b == 0)
    x = 1;
  else
    x = a;
  for (size_t i = 1; i < b; i++) x *= a;
  return x;
}
long long int gcd(long long int a, long long int b) {
  return b == 0 ? a : gcd(b, a % b);
}
long long int n, m, a, b, c, ab, ba, x, y, z, avg, sum;
int arr3[1000001], arr4[200001], arr5[100001];
bool f, f1, f2;
string str, s1, s2, s3, s4;
set<int> seto;
double d, d1;
long long int x1, x2, y11, y2;
int mini = 1 << 30, maxi = 0;
vector<int> v;
stack<int> s;
int main() {
  cin >> str;
  arr3[0] = -1;
  for (int i = 0; i < str.size(); i++) {
    if (str[i] == '(') {
      s.push(i);
      arr3[s.size()] = i;
    } else if (!s.empty()) {
      s.pop();
      x = i - arr3[(int)s.size()];
      if (x > maxi) {
        maxi = x;
        sum = 1;
      } else if (x == maxi)
        sum++;
    } else {
      arr3[0] = i;
    }
  }
  cout << maxi << ' ' << max((long long int)1, sum);
}