char a[101];n,s,m,t;main(c){ for(gets(a);~scanf("%d%s",&t,a);t=t*.012,s+=t>c?c:t,m+=c,c=0)while(a[++c]); n=!printf("%d %d",s,m-s); }