#C1091. Maximum Product of Two Numbers
Maximum Product of Two Numbers
Maximum Product of Two Numbers
Given a list of integers, your task is to find the highest possible product obtainable by multiplying exactly two different elements from the list. Note that the list can include both positive and negative numbers. In cases where the list contains negative numbers, the product of the two smallest (most negative) numbers might be larger than the product of the two largest positive numbers.
The formula to evaluate the maximum product can be expressed in \( \max( a_{n-1} \times a_{n-2},\; a_0 \times a_1 ) \) where the array is sorted in non-decreasing order.
Input is provided via standard input (stdin) and the answer should be output to standard output (stdout).
inputFormat
The first line contains a single integer \( n \) (where \( n \ge 2 \)), representing the number of elements in the list. The second line contains \( n \) space-separated integers.
outputFormat
Output a single integer representing the highest possible product obtained by multiplying two different elements from the list.
## sample5
5 1 3 4 2
20
</p>