#include #include #include int main() { int x = 0, y = 0; std::string c; std::cin >> c; for (int i = 0;; i++) { if (c[i] == '^'&&c[i+1]=='*') { x++; }else if (c[i] == '*'&&c[i + 1] == '^') { y++; } if (c[i] == '#')break; } printf("%d %d", x, y); getchar(); getchar(); return 0; }