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;
#pragma GCC optimize("Ofast")
#pragma GCC target( \
    "fma,sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#pragma GCC optimize("unroll-loops")
long long comb(long long n, long long r) {
  if (r < 0 || r > n) return 0;
  if ((n - r) < r) r = n - r;
  long long a = 1;
  for (long long i = n; i > n - r; --i) {
    a = a * i;
  }
  for (long long i = 1; i < r + 1; ++i) {
    a = a / i;
  }
  return a;
}
long long Set(long long qq, long long pos) { return (qq | (1 << pos)); }
long long chk(long long qq, long long pos) { return (qq & (1 << pos)); }
long long p2(long long idx) { return ((1LL << idx)); };
long long modpow(long long x, long long n, long long m) {
  if (n == 0) return 1 % m;
  long long u = modpow(x, n / 2, m);
  u = (u * u) % m;
  if (n % 2 == 1) u = (u * x) % m;
  return u;
}
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long _pow(long long a, long long b) {
  if (!b) return 1;
  long long temp = _pow(a, b / 2);
  temp = (temp * temp);
  if (b % 2) return (a * temp);
  return temp;
}
long long ceil(long long a, long long b) {
  if (a % b) return 1 + a / b;
  return a / b;
}
void printvec(const vector<long long> &AAA) {
  for (auto SDDD : AAA) cout << SDDD << " ";
  cout << "\n";
}
long long dx[] = {0, 0, -1, 1};
long long dy[] = {1, -1, 0, 0};
const long long MOD = 1e9 + 7;
const long long N = 1e5 + 10;
const long long inf = 1e18;
void solve() {
  long long n;
  string s;
  cin >> s;
  n = (long long)((s).size());
  stack<pair<char, long long>> stt;
  vector<long long> dp(n + 1, 0);
  vector<long long> ind(n, -1);
  for (long long i = 0; i < n; i++) {
    if (!stt.empty() && s[i] == ')') {
      ind[i] = stt.top().second;
      stt.pop();
    } else if (s[i] == '(') {
      stt.push({'(', i});
    }
  }
  for (long long i = 1; i < n; i++) {
    if (s[i] == ')') {
      if (ind[i] != -1) {
        dp[i] = i - ind[i] + 1;
        if (ind[i] - 1 > 0) dp[i] += dp[ind[i] - 1];
      }
    }
  }
  map<long long, long long> mp;
  long long maxx = -234;
  for (long long i = 0; i < n; i++) {
    mp[dp[i]]++;
    if (maxx < dp[i]) maxx = dp[i];
  }
  mp[0] = 1;
  cout << maxx << " " << mp[maxx] << "\n";
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long TESTS = 1;
  long long GOOOGLE = 1;
  while (TESTS--) {
    solve();
    GOOOGLE++;
  }
}