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