n,s;main(x){for(;~scanf("%d",&x);)s+=x*!!n++;s/=n--*2-4;n=!printf("%d %d",2*n-s,s-n);}