#include using namespace std; int main() { string s; cin >> s; int i = 0; int L = 0; int R = 0; while (s[i] != '#') { if (s[i+1] == '^') L++; else if (s[i+1] == '*') R++; i += 5; } cout << L << " " << R << endl; return 0; }