#include #include using namespace std; int main() { int c=0,d=0; string S; cin >> S; for (int i = 0; i < S.size(); i++) { if (S[i] == '(' && S[i + 3] == '*') { c++; i += 4; } else if (S[i] == '(' && S[i + 1] == '*') { d++; i += 4; } } cout << c << " " << d << endl; return 0; }