#include <bits/stdc++.h>
int main() {
  char s[1000001];
  gets(s);
  int n = strlen(s);
  int a[n], b[n];
  int i, j;
  for (i = 0; i < n; i++) {
    a[i] = 0;
    b[i] = 0;
  }
  for (i = 0; i < n; i++) {
    while (s[i] == ')' && i < n) {
      i++;
    }
    int k = 0;
    for (j = i; j < n; j++) {
      if (s[j] == '(')
        k++;
      else
        k--;
      if (k < 0) {
        i = j;
        break;
      }
      a[i]++;
      if (k == 0) b[i] = a[i];
      if (j == n - 1) {
        if (k > 0) {
          a[i] = 0;
          for (int x = n - 1; x >= i; x--) {
            while (s[x] == '(') {
              x--;
            }
            int z = 0;
            for (int y = x; y >= i; y--) {
              if (s[y] == ')')
                z++;
              else
                z--;
              if (z < 0) {
                x = y;
                break;
              }
              a[x]++;
              if (z == 0) b[x] = a[x];
            }
          }
          i = n;
        } else
          i = n;
      }
    }
  }
  int max = 0;
  int dem = 0;
  for (i = 0; i < n; i++) {
    if (max < b[i]) max = b[i];
  }
  if (max == 0)
    printf("0 1");
  else {
    for (i = 0; i < n; i++) {
      if (max == b[i]) dem++;
    }
    printf("%d %d", max, dem);
  }
  return 0;
}
