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