eolymp
bolt
Try our new interface for solving problems
Problems

Points diameter

Points diameter

There are \textbf{n} points on a plane. Find the distance between the most distant points. \InputFile The first line contains the number of points \textbf{n }(\textbf{3 }≤ \textbf{n }≤ \textbf{10^5}). Each of the next \textbf{n} lines contain two integers - the coordinates \textbf{x_i} and \textbf{y_i}. The coordinates are not greater than \textbf{10^9} by absolute value. \OutputFile Print the diameter length of the convex hull with maximum accuracy.
Time limit 1 second
Memory limit 64 MiB
Input example #1
5
0 0
2 2
1 1
0 2
2 0
Output example #1
2.828427124746
Input example #2
7
0 0
1 1
2 2
0 2
1 3
0 1
2 0
Output example #2
3.162277660168