#1011. The Enigmatic Integer List

内存限制:256 MiB 时间限制:1000 ms 标准输入输出
题目类型:传统 评测方式:文本比较
上传者: admin

题目描述

In a distant, mystical land known as Numeria, there lies a peculiar village called Arithmetica. The villagers of Arithmetica are avid mathematicians, and they love playing mathematical games. In the heart of this village, there stands an ancient and enigmatic Tree of Numbers.

The Tree of Numbers is rumored to possess magical properties, granting great power to those who can decipher its secrets. Legend has it that if you present the Tree with a list of (n) integers, it will reveal the maximum possible product of two numbers from the list.

Now, you've been entrusted with a quest: help the villagers of Arithmetica by writing a program to unveil the Tree's mysteries and find the maximum product of two numbers from a given list.

输入格式

The first line contains an integer, (), representing the number of integers in the list. The second line contains integers (), separated by spaces. These integers represent the offerings to the Tree of Numbers.

输出格式

Output a single number, the maximum product of two numbers that can be obtained from the given list.

样例

样例输入

6
1 2 3 4 5 6

样例输出

30

数据范围与提示

For all test cases, , and .