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>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const long double PI = acos(-1);
const int N = 2e5 + 10;
const long long mod = 1e9 + 7;
const long long inf = 2e18;
long long xyp(long long x, long long y) {
  if (y == 0) return 1LL;
  if (y == 1) return x;
  if (y % 2) {
    long long p = xyp(x, y - 1);
    return (x * p) % mod;
  }
  long long p = xyp(x, y / 2);
  return (p * p) % mod;
}
long long add(long long a, long long b) {
  return (a % mod + b % mod + mod) % mod;
}
long long sub(long long a, long long b) {
  return (a % mod - b % mod + mod) % mod;
}
long long mul(long long a, long long b) {
  return ((a % mod) * (b % mod) + mod) % mod;
}
template <class T>
ostream& operator<<(ostream& os, vector<T> V) {
  os << "[ ";
  for (auto v : V) os << v << " ";
  return os << "]";
}
template <class T>
ostream& operator<<(ostream& os, set<T> second) {
  os << "{ ";
  for (auto s : second) os << s << " ";
  return os << "}";
}
template <class L, class R>
ostream& operator<<(ostream& os, pair<L, R> P) {
  return os << "(" << P.first << "," << P.second << ")";
}
template <class L, class R>
ostream& operator<<(ostream& os, map<L, R> M) {
  os << "{ ";
  for (auto m : M) os << "(" << m.first << ":" << m.second << ")";
  return os << "}";
}
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cout << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(12);
  {
    int pos = -1, ans = 1, maxi = 0;
    string s;
    stack<int> stk;
    cin >> s;
    for (int i = 0; i < s.length(); i++) {
      if (s[i] == '(')
        stk.push(i);
      else if (stk.empty())
        pos = i;
      else {
        stk.pop();
        int temp = i - (stk.empty() ? pos : stk.top());
        if (maxi < temp) {
          maxi = temp;
          ans = 1;
        } else if (maxi == temp)
          ++ans;
      }
    }
    cout << maxi << " " << ans << '\n';
  }
  return 0;
}