E. Wifi Connection
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Observation stations for early wildfire detection are being installed in a national park, each carrying a signaling device. A signaling device costing $$$P$$$ can connect to any other device within $$$\sqrt{P}$$$ distance. All observation stations contain a signaling device with the same power. Given a list of the coordinates of all $$$N$$$ observation stations in cartesian coordinates $$$(X_i, Y_i)$$$, find the minimum $$$P$$$ of the signaling devices in the observation stations so they are all connected (it counts as connected even if a transmission needs to pass through multiple stations).

Input

Line $$$1$$$: One integer $$$N$$$ $$$(1 \le N \le 500)$$$.

Lines $$$2...N+1$$$: Two space separated integers $$$X_i$$$ and $$$Y_i$$$ $$$(0 \le X_i, Y_i \le 10^4)$$$.

Output

Line $$$1$$$: The minimum $$$P$$$

Example
Input
5
1 2
5 5
5 8
10 6
12 3
Output
26