# 5/15 tle on batch 3,4,5

import math

nums = int(input())
boards = list(map(int, input().split(" ")))

possibleCombinations = []
combinationCount = []

for i in range(0,nums):
    for n in range(i+1, nums):
        if (boards[i]+boards[n] not in possibleCombinations):
            possibleCombinations.append(boards[i]+boards[n])
            combinationCount.append(0)

def findgroups(a, target): 
    counter = 0
    used = []
    for i in range(len(a)):
        start = a[i]
        for n in range(len(a)):
            if n != i and i not in used and n not in used and start + a[n] == target:
                counter += 1
                used.append(i)  
                used.append(n)
                break
    return counter

for i in range(len(possibleCombinations)):
    combinationCount[i] = findgroups(boards, possibleCombinations[i])

combinationCount = sorted(combinationCount)[::-1]

val = combinationCount[0]
counter = 0

for element in combinationCount:
    if element == val:
        counter += 1
    else:
        break

print(val, counter)