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