Just Pentagon Perimeter

Given a set of points in the plane, find the convex pentagon with largest perimeter such that each vertex of the pentagon is a unique point in the point set! Note that convex means no line segment between two points on the boundary of the pentagon ever goes outside the pentagon. Input A number of test cases (≤ 100), one per line, each with N (1 ≤ N ≤ 8500), followed by N points with (x, y) integer. Each integer fit in 32 bits signed. Note there are no duplicate points. Output Output the perimeter rounded to 2 decimal places on one line for each test case. If no such pentagon exists, print ‘-1’. Sample Input 1 00 6 00 02 12 13 20 22 Sample Output -1 8.83