Robert Hood
Robert Hood, a less famous sibling of the Robin Hood, is fed up. Despite him being a young, talented archer he never seems to reach quite the same level as his legendary brother, and so he decided to come up with rules for a new archery contest, in which he will stand a better chance of winning.
The rules for the new kind of archery contest are quite simple: the winner is no longer the one who can score the most points, but instead the one who can achieve the longest distance between any pair of arrows hitting the target. Your task is to write the code to calculate that distance.
A contestant is allowed a number of arrow shots, and the coordinates of the arrows successfully hitting the target are given as a list of pairs. The coordinate system is Cartesian with the origin in the center of the archery butt. If a contestant does not hit the target with at least two arrows he or she is disqualified and removed from the input data.
Your task is to calculate the score for a contestant that has not been disqualified.
Input
Starts with a line containing the number of shots c (2 ≤ c ≤ 100000) successfully hitting the target for this particular contestant. Each following line contains a pair of integer coordinates separated by a space, representing the x and y coordinates of a successful shot. The absolute value of any coordinate does not exceed 1000.
Output
Print the longest distance between any pair of arrows as a floating point number on a single line. The answer is considered correct if it has a relative or absolute error of less than 10^(-6)
.