#include int main(){ int n,m,x,s=0; scanf("%d",&n);m=n; while(m--){scanf("%d",&x);s+=x;}s/=(n-1)*2; printf("%d %d",2*n-s,s-n); return 0; }