#include using namespace std; typedef long long ll; int main() { cin.tie(0); ios::sync_with_stdio(false); string s; cin >> s; int l = 0, r = 0; for(int i = 0; i < s.size(); i++) { if(s[i] == '*') { if(s[i + 1] == ')') l++; else r++; } } cout << l << " " << r << endl; }