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