#include using namespace std; int main() { string S; cin >> S; int x = 0, y = 0; for (int i = 0; i < S.size() - 1; i++) { if (S.at(i) == '^' and S.at(i + 1) == '*') x++; if (S.at(i) == '*' and S.at(i + 1) == '^') y++; } cout << x << " " << y << "\n"; }