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 <typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2>& a) {
  in >> a.first >> a.second;
  return in;
}
template <typename T1, typename T2>
ostream& operator<<(ostream& out, pair<T1, T2> a) {
  out << a.first << " " << a.second;
  return out;
}
template <typename T, typename T1>
T amax(T& a, T1 b) {
  if (b > a) a = b;
  return a;
}
template <typename T, typename T1>
T amin(T& a, T1 b) {
  if (b < a) a = b;
  return a;
}
const long long fx[] = {+1, -1, +0, +0};
const long long fy[] = {+0, +0, +1, -1};
const int32_t M = 1e9 + 7;
const int32_t MM = 998244353;
void solve() {
  string s;
  cin >> s;
  long long n = s.size();
  vector<long long> dp(n, 0);
  dp[0] = 0;
  long long ans = 0;
  for (long long i = 1; i < n; i++) {
    if (s[i] == '(')
      dp[i] = 0;
    else {
      long long len = dp[i - 1];
      if (i - len - 1 >= 0 && s[i - len - 1] == '(') {
        dp[i] = 2 + dp[i - 1];
        if (i - len - 2 >= 0) {
          dp[i] += dp[i - len - 2];
        }
      }
    }
    ans = max(ans, dp[i]);
  }
  long long cnt = 0;
  for (long long i = 0; i < n; i++) {
    if (dp[i] == ans) cnt++;
  }
  if (ans == 0) {
    cout << "0 1"
         << "\n";
    return;
  }
  cout << ans << " " << cnt << "\n";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) solve();
  return 0;
}