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).
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)$$$.
Line $$$1$$$: The minimum $$$P$$$
5 1 2 5 5 5 8 10 6 12 3
26
| Name |
|---|


