~/algor $ cat problems/minmax-35-eng-katta-kopaytma
Largest product of two numbers
Medium
1000 ms
128 MB
51%
A positive integer $N$ and $N$ integers are given. Find the largest value of the product of two elements at different positions $A_{i} * A_{j}$ ($i \ne j$).
Input
The first line contains a positive integer $N$. The next line contains $N$ integers $A_{i}$.
Output
One integer.
Note
$2 \le N \le 10^{5}$
$-10^{9} \le A_{i} \le 10^{9}$
Examples
Input #1
5 -8 3 -6 5 2
Output #1
48
Input #2
2 -4 7
Output #2
-28