N = input() a = map(int,raw_input().split()) S = sum(a)/(N-1) n = [0,0] for i in xrange(N): n[S-a[i]==4] += 1 print n[0], n[1]