eolymp
bolt
Попробуйте наш новый интерфейс для отправки задач
Задачи

Longest Lane

Longest Lane

Лимит времени 1 секунда
Лимит использования памяти 64 MiB

Mr. KM, the mayor of KM city, decided to build a new elementary school. The site for the school has an awkward polygonal shape, which caused several problems. The most serious problem was that there was not enough space for a short distance racetrack. Your task is to help Mr. KM to calculate the maximum possible length for the racetrack that can be built in the site. The track can be considered as a straight line segment whose width can be ignored. The boundary of the site has a simple polygonal shape without self-intersection, and the track can touch the boundary. Note that the boundary might not be convex.

Входные данные

N

3N100

N

x_i

y_i

−1000 ≤ x_i, y_i ≤ 1000

The input consists of multiple test cases, followed by a line containing "0". Each test case has the following format. The first line contains an integer (). Each of the following lines contains two integers and (), which describe the coordinates of a vertex of the polygonal border of the site, in counterclockwise order.

Выходные данные

10^{-6}

For each test case, print its case number and the maximum possible length of the track in a line. The answer should be given as a floating point number with an absolute error of at most .

Пример

Входные данные #1
4
0 0
10 0
10 10
0 10
3
0 0
1 0
0 1
0
Выходные данные #1
Case 1: 14.142135624
Case 2: 1.41421356
Источник ACM-ICPC Japan Alumni Group Spring Contest 2012 , Tokyo, Japan, 2012-04-15