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