# No.112 ややこしい鶴亀算 N = int(input()) a = [int(i) for i in input().split()] if max(a) == min(a): print('{0} {1}'.format(N, 0) if a[0] % 4 == 0 else '{0} {1}'.format(0, N)) else: print('{0} {1}'.format(a.count(max(a)), N - a.count(max(a))))