Problem

10 /23


The pair with the minimum amount

Problem

The input of the program is a sequence of N positive integers. All pairs of different elements of the sequence are considered (the elements of a pair do not have to be side by side in the sequence, the order of the elements in the pair is unimportant).
It is necessary to determine the minimum sum of an arbitrary pair of numbers and the number of pairs with the sum equal to the minimum. 

Input
The first line of the input specifies the number of numbers N (\(1 < N <= 10000\)).
Each of the following N lines contains one natural number not exceeding 10000.

Imprint
As a result, the program should display two numbers: the found minimum sum and the number of pairs with the sum equal to the minimum.
 

 

Examples
# Input Output
1
10 
1
2
3
1
2
3
1
2
3
1
2 6
2
2
2
1
2
2
3 4