N = int(input()) A = list(map(int, input().split())) ma = max(A) ans = [0, 0] for a in A: if ma - a == 0: ans[0] += 1 else: ans[1] += 1 print(*ans)