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