N = int(input()) a = list(map(int, input().split())) s = sum(a) // (N - 1) kame = (4*N - s) // 2 print(kame, N - kame)