#!/usr/bin/env python3 # %% import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines import numpy as np from scipy.sparse.csgraph import connected_components # %% N = int(readline()) XY = np.array(read().split(), np.int64) X = XY[::2] Y = XY[1::2] # %% dx = X[:, None] - X[None, :] dy = Y[:, None] - Y[None, :] dist_mat = dx**2 + dy**2 # %% def test(x): graph = dist_mat <= x * x _, comp = connected_components(graph, directed=False) return comp[0] == comp[-1] # %% left = 0 right = 10 ** 9 * 2 while left + 1 < right: x = (left + right) // 2 if test(x): right = x else: left = x answer = right + (-right) % 10 print(answer)