#include int main(void) { char s[100001]; scanf("%s", s); int i = 3, l = 0, r = 0; while (s[i] == 40 || s[i] == 94 || s[i] == 42 || s[i] == 41) { if (s[i] == 42) l++; i += 5; } i = 1; while (s[i] == 40 || s[i] == 94 || s[i] == 42 || s[i] == 41) { if (s[i] == 42) r++; i += 5; } printf("%d %d\n", l, r); return 0; }