#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { string S; cin >> S; int L = 0, R = 0; for (int i = 0; i < S.size(); ++i) { string subst = S.substr(i, 2); if (subst == "*)") { L += 1; } else if (subst == "(*") { R += 1; } } cout << L << " " << R << endl; return 0; }