n=int(input()) s=sum(map(int,input().split())) s//=(n-1)*2 print(2*n-s,s-n)