#include #include #include using namespace std; #define rep(i,a,n) for (int i = 0; i < n; i++) int rp() { int n; cin >> n; return n; } vector input(int n) { vectorvec(n); rep(i, 0, n) { vec.at(i) = rp(); } return vec; } int main() { string S; cin >> S; int n = S.size(); int left = 0, right = 0; for (int i = 0; i < n; i += 5) { if (S.at(i) == '#') { break; } string t = S.substr(i, 5); if (t == "(^^*)") { left++; } else { right++; } } cout << left << ' ' << right << endl; }