#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  string str_01;
  cin >> str_01;
  int Front = 0, Back = 0, Max1 = 0, Max2 = 0, mem = 0, Count = 0;
  for (int x = 0; x < str_01.size(); x++) {
    if (str_01[x] == '(') {
      Front++;
      mem++;
    } else {
      if (Front > 0) {
        Front--;
        mem++;
        if (x == str_01.size() - 1) {
          if (Front == 0 && mem > Max1) Max1 = mem;
        }
      } else {
        if (Front == 0) {
          if (mem > Max1) Max1 = mem;
          mem -= mem;
        }
      }
    }
  }
  mem = 0;
  for (int x = str_01.size() - 1; x >= 0; x--) {
    if (str_01[x] == ')') {
      Back++;
      mem++;
    } else {
      if (Back > 0) {
        Back--;
        mem++;
        if (x == 0) {
          if (Back == 0 && mem > Max2) Max2 = mem;
        }
      } else {
        if (Back == 0) {
          if (mem > Max2) Max2 = mem;
          mem -= mem;
        }
      }
    }
  }
  if (max(Max1, Max2) != 0) {
    if (Max1 >= Max2) {
      Front = 0, mem = 0;
      for (int x = 0; x < str_01.size(); x++) {
        if (str_01[x] == '(') {
          Front++;
          mem++;
        } else {
          if (Front > 0) {
            Front--;
            mem++;
            if (x == str_01.size() - 1) {
              if (Front == 0 && mem == Max1) Count++;
            }
          } else {
            if (Front == 0) {
              if (mem == Max1) Count++;
              mem -= mem;
            }
          }
        }
      }
      cout << Max1 << " " << Count << "\n";
    } else {
      Back = 0, mem = 0;
      for (int x = str_01.size() - 1; x >= 0; x--) {
        if (str_01[x] == ')') {
          Back++;
          mem++;
        } else {
          if (Back > 0) {
            Back--;
            mem++;
            if (x == 0) {
              if (Back == 0 && mem == Max2) Count++;
            }
          } else {
            if (Back == 0) {
              if (mem == Max2) Count++;
              mem -= mem;
            }
          }
        }
      }
      cout << Max2 << " " << Count << "\n";
    }
  } else
    cout << "0 1\n";
  return 0;
}
