class UnionFind: def __init__(self, size): # 負の値はルート (集合の代表) で集合の個数 # 正の値は次の要素を表す self.table = [-1 for _ in range(size)] def find(self, x): # 集合の代表を求める while self.table[x] >= 0: x = self.table[x] return x def union(self, x, y): # 併合 s1 = self.find(x) s2 = self.find(y) if s1 != s2: if self.table[s1] >= self.table[s2]: self.table[s1] += self.table[s2] self.table[s2] = s1 else: self.table[s2] += self.table[s1] self.table[s1] = s2 return self.table[s1] def distance(px, py, qx, qy): return ((px - qx) * (px - qx) + (py - qy) * (py - qy))**0.5 def distance2(px, py, qx, qy): return ((px - qx) * (px - qx) + (py - qy) * (py - qy)) def acceptable(lenght): uf = UnionFind(N) for x in range(N): for y in range(N): if D[x][y] <= lenght * lenght: uf.union(x, y) return len(set([uf.find(i) for i in range(N)])) == 1 N = int(input()) P = [] for i in range(N): x, y = map(int, input().split()) P.append((x, y)) D = [[0 for j in range(N)] for i in range(N)] for x in range(N): for y in range(N): D[x][y] = distance2(P[x][0], P[x][1], P[y][0], P[y][1]) lower_limit = 0 upper_limit = int(1.5 * 10**9) while lower_limit < upper_limit: mid = (lower_limit + upper_limit) // 2 if acceptable(mid): upper_limit = mid else: lower_limit = mid + 1 print(lower_limit,upper_limit) if lower_limit % 10 > 0: lower_limit = lower_limit // 10 * 10 + 10 print(lower_limit)