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