char s[1<<17];l,r;main(i){for(gets(s);s[i];i+=5)s[i]-94?r++:l++;printf("%d %d",l,r);}