N = int(input()) M = list(map(int, input().split())) M = sum(M) // (N-1) for t in range(N+1): if 2*t + 4*(N-t) == M: print(t, N-t)