N = int(input()) A = list(map(int, input().split())) b = max(A) c = len([x for x in A if x == a]) if N != c: print(f"{c} {N - c}") else: if 2 * c == b + 2: print(f"{c} 0") else: print(f"0 {c}")