#include using namespace std; int main(){ string S; cin >> S; int r=0, l=0; while(S.front() != '#'){ if(S.substr(0, 5)=="(*^^)") r++; else l++; S.erase(0,5); } cout << l << ' ' << r << endl; return 0; }