#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define Would #define you const int INF = 999999999; const int MOD = 1e9 + 7; int r, l; int main() { string h; cin >> h; for (int i = 1; i < h.length(); i += 5) { if (h[i] == '^') { ++l; } else { ++r; } } cout << l << " " << r << endl; }