PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#FW0000047. Ếch qua hồ (Frogger)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Ếch qua hồ (Frogger)

Frogger

Source: UVa

Version: Phuoc Hung OJ Extended

Problem Statement

There are n stones at integer coordinates in a pond. A frog must travel from stone 1 to stone 2 and may land on intermediate stones. The difficulty of a route is its longest single jump. Minimize this maximum jump.

Input

First n, followed by n lines x_i y_i.

Output

Print the minimum possible maximum jump length with exactly three digits after the decimal point.

Subtasks

  • Subtask 1 (40 points): 2≤n≤7, ∣xi∣,∣yi∣≤202\le n\le 7,\ |x_i|,|y_i|\le 20. All coordinates are integers. Different stones may share the same coordinates.
  • Subtask 2 (60 points): 2≤n≤100, ∣xi∣,∣yi∣≤10002\le n\le 100,\ |x_i|,|y_i|\le 1000. All coordinates are integers. Different stones may share the same coordinates.

Examples

Input

3
0 0
6 0
3 0

Output

3.000

Explanation

The direct jump is 6 units. Using the third, middle stone gives two jumps of length 3, so the optimum is 3.000.