~/algor $ cat problems/minmax/largest-product-of-two-numbers
Largest product of two numbers
Medium
1000 ms
128 MB
51%
A positive integer and integers are given. Find the largest value of the product of two elements at different positions ().
Input
The first line contains a positive integer . The next line contains integers .
Output
One integer.
Note
Examples
Input #1
5 -8 3 -6 5 2
Output #1
48
Input #2
2 -4 7
Output #2
-28