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;
const long long hell = 1e9 + 7;
long long inf = 1e18;
const long long N = 1e5 + 9;
bool prime(long long n) {
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
long long power(long long a, long long b, long long m) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = (ans * a) % m;
    b /= 2;
    a = (a * a) % m;
  }
  return ans;
}
long long modinv(long long k) { return power(k, hell - 2, hell); }
long long fact[N], invfact[N];
void precompute() {
  fact[0] = 1;
  fact[1] = 1;
  for (long long i = 2; i < N; i++) {
    fact[i] = fact[i - 1] * i;
    fact[i] = fact[i] % hell;
  }
  invfact[N - 1] = power(fact[N - 1], hell - 2, hell);
  for (long long i = N - 2; i >= 0; i--) {
    invfact[i] = invfact[i + 1] * (i + 1);
    invfact[i] = invfact[i] % hell;
  }
}
long long nCr(long long x, long long y) {
  if (x < y) return 0;
  long long num = fact[x] % hell;
  num = num * invfact[y] % hell;
  num = num * invfact[x - y] % hell;
  return num;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  while (t--) {
    long long n;
    string st;
    cin >> st;
    n = st.size();
    stack<long long> s;
    long long ans = 0;
    long long earliestopening[n], corresponding[n];
    memset(earliestopening, -1, sizeof(earliestopening));
    memset(corresponding, -1, sizeof(corresponding));
    long long mx = 0;
    for (long long i = 0; i < n; i++) {
      if (st[i] == '(')
        s.push(i);
      else {
        if (!s.empty()) {
          corresponding[i] = s.top();
          s.pop();
          if (st[corresponding[i] - 1] == ')' and
              earliestopening[corresponding[i] - 1] > -1)
            earliestopening[i] = earliestopening[corresponding[i] - 1];
          else
            earliestopening[i] = corresponding[i];
          if (i - earliestopening[i] + 1 > mx) {
            mx = i - earliestopening[i] + 1;
            ans = 1;
          } else if (i - earliestopening[i] + 1 == mx)
            ans++;
        } else
          continue;
      }
    }
    if (mx > 0)
      cout << mx << " " << ans << "\n";
    else
      cout << "0 1\n";
  }
  return 0;
}