N = int(input()) S = sum(list(map(int,input().split())))//(N-1) # x+y = N # 2x+4y = S # 2y = S - 2N y = (S-2*N)//2 x = N-y print(x,y)