#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; long long MOD = 1000000007; int main() { int right = 0, left = 0; string S; cin >> S; if ( S == "#" ) { cout << 0 << " " << 0 << endl; return 0; } for ( int i = 0; i < S.length()-5; i+=5 ) { if ( S.substr( i, 5 ) == "(^^*)" ) { left++; } else { right++; } } cout << left << " " << right << endl; return 0; }