#include #include using namespace std; string s; int main() { int left = 0; cin >> s; for (int i = 0; i <= s.length() - 1; i++) { if (s[i] == '^'&&s[i + 1] == '*')left++; } cout << left << " " << (s.length() - 1) / 5 - left << endl; return 0; }