PRODUCT#7507

PRODUCT

0.3 seconds
128 megabytes
Medium

We have integers. What is the maximum product that can be achieved by using exactly three of these numbers?

Input

The first line contains a non-negative integer (3 \leq N \leq 10^6). The second line lists integers, each with an absolute value no greater than 10^5.

Output

Output the maximum product obtainable from any three of these integers.

Examples

Example 1

Loading
Loading