n = int(raw_input()) s = sum(map(int,raw_input().split())) for i in range(n+1): if (2*i + 4*(n-i))*(n-1) == s: print i,n-i break