blob: 2b21194dc45e262f7e3972093ac61114ce89ca74 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
uses math, clib;
var
n, i: int16;
a: array of int64;
begin
readln(n);
setlength(a, n);
for i := 0 to n - 1 do
read(a[i]);
qsort(a);
writeln(max(a[0] * a[1], a[n - 2] * a[n - 1]))
end.
|