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