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