Азербайджан - подготовка. Март 16

Grassland Fence

There is a large grassland next to the villa Pemberley in the southern region of Byterland. Mrs. Darcy is afraid of her potted plants being trampled by strangers, so she decides to fence in some triangular areas in the grassland.

Mrs. Darcy has several fences in her basement. She will form each triangular area using exactly three fences, such that each side of the triangle is a single fence. Since the fences are beautifully decorated, she will not glue multiple fences together to form a single side, or split a single fence into multiple smaller fences. Her goal is to fence in as large an area as possible.


Each line is a separate test case. The first number in the line is the amount n (n16) of Mrs. Darcy's fences. Next n numbers are the lengths of these fences which are the integers between 1 and 100.


For each test case print in a separate line the maximal area that can be fenced in with 4 digits after the decimal point.

Time limit 1 second
Memory limit 64 MiB
Input example #1
7 3 4 5 6 7 8 9
4 1 2 4 8
4 7 4 4 4
Output example #1