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