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