#include #include #include #include #include int main() { int left = 0; int right = 0; char str[100001] = ""; scanf("%s", str); for (int i = 0;i != '#';i++) { if (str[i] == '*') { if (str[i - 1] == '^') { left++; } else if (str[i + 1] == '^') { right++; } } } printf("%d %d", left, right); return 0; }