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 Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
const long long mod = 1000 * 1000 * 1000 + 7;
const long long inf = max(8230219982008199610LL,
                          1ll * 1000 * 1000 * 1000 * 1000 * 1000 * 1000 + 7);
const long long MOD2 = 998244353;
const long long N = 4 * 1000 * 100 + 1;
const long long N2 = 70;
const long double PI = 3.1415926535897932384626433832795;
long long power(long long x, long long y, long long p = LLONG_MAX) {
  long long res = 1;
  x %= p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
unsigned long long leftRotate(unsigned long long n, unsigned long long d) {
  return (n << d) | (n >> (64 - d));
}
unsigned long long rightRotate(unsigned long long n, unsigned long long d) {
  return (n >> d) | (n << (64 - d));
}
long long comb(long long n, long long r) {
  if (r == 0 || r == n) return 1;
  return comb(n - 1, r) + comb(n - 1, r - 1);
}
long long in(long long a, long long m) {
  return 1 < a ? m - in(m % a, a) * (m / a) : 1;
}
long long count(string s) {
  long long ans = 1, i, j;
  for (i = 1; i < s.length(); i++) {
    for (j = 0; j < i; j++) {
      if (s[i] == s[j]) break;
    }
    if (i == j) ans++;
  }
  return ans;
}
void multiply(long long a[2][2], long long m[2][2]) {
  long long him[2][2];
  for (long long i = 0; i < 2; i++) {
    for (long long j = 0; j < 2; j++) {
      him[i][j] = 0;
      for (long long k = 0; k < 2; k++) {
        him[i][j] += (a[i][k] * m[k][j]);
      }
    }
  }
  for (long long i = 0; i < 2; i++) {
    for (long long j = 0; j < 2; j++) {
      a[i][j] = him[i][j];
    }
  }
}
bool is_prime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
long long primecounter(long long l, long long r) {
  long long fact = 1, count = 0;
  for (long long i = l; i <= r; i++) {
    if (((fact - i) % ((1LL << i) - 1)) == 0) count++;
    fact *= ((1LL << i) - 1);
  }
  return count;
}
long long counteprime(long long l, long long r) {
  long long count = 0, i, j;
  for (i = l; i <= r; i++) {
    for (j = 2; j <= (i / j); j++) {
      if (!(i % j)) break;
    }
    if (j > (i / j)) count++;
  }
  return count;
}
long long fibo(long long n) {
  long double ans = (1 + sqrt(5)) / 2;
  return round(pow(ans, n) / sqrt(5));
}
void IO() {}
void solve() {
  string s;
  cin >> s;
  long long n = s.length();
  long long c[n], d[n];
  memset(c, -1, sizeof(c));
  memset(d, -1, sizeof(d));
  stack<long long> S;
  for (long long i = 0; i < n; i++) {
    if (s[i] == '(') {
      S.push(i);
    } else {
      if (!S.empty()) {
        d[i] = S.top();
        c[i] = S.top();
        S.pop();
        if ((d[i] - 1) > -1) {
          if (c[d[i] - 1] != -1) {
            c[i] = c[d[i] - 1];
          }
        }
      }
    }
  }
  map<long long, long long> mp;
  for (long long i = 0; i < n; i++) {
    if (c[i] != -1) ++mp[(i - c[i] + 1)];
  }
  if (mp.empty()) {
    cout << "0 1"
         << "\n";
  } else {
    auto it = mp.end();
    --it;
    cout << it->first << " " << it->second << "\n";
  }
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  IO();
  solve();
  return 0;
}