Sticks#1405

Sticks

1 second
128 megabytes
Very easy

The Law of the Jungle is very clear: every wolf, after starting a family, may leave his Pack. But as soon as his cubs grow up and become strong enough, he must bring them to the Council of the Pack, which usually gathers once a month during the full moon, and present them to all the other wolves.

Father Wolf waited until his cubs had grown a little and started running around. Then, on one of the nights when the Pack gathered, he led them — together with Mowgli and Mother Wolf — to the Council Rock. It was the top of a hill covered with large boulders, behind which a hundred wolves could hide. Akela, the great gray lone wolf, chosen as leader of the whole Pack for his strength and agility, called out from his rock:

— The Law is known to you, the Law is known to you! Look well, wolves!

Father Wolf pushed Frog, Mowgli, into the center of the circle. Mowgli sat down on the ground, laughed, and began to play with some sticks.

He came up with a simple task: to make a rectangle with the largest possible area from these sticks — it is not necessary to use all the sticks.

Input

The first line contains the number of sticks (1 \leq n \leq 16).

The second line contains their lengths — natural numbers from to 10^8.

Output

Print the maximum possible area of a rectangle that can be made from the given set of sticks, or if forming a rectangle is impossible.

Examples

Example 1

Loading
Loading