from heapq import * from collections import defaultdict import sys sys.setrecursionlimit(10 ** 6) int1 = lambda x: int(x) - 1 p2D = lambda x: print(*x, sep="\n") def II(): return int(sys.stdin.readline()) def MI(): return map(int, sys.stdin.readline().split()) def LI(): return list(map(int, sys.stdin.readline().split())) def LLI(rows_number): return [LI() for _ in range(rows_number)] class UnionFind: def __init__(self, n): self.state = [-1] * n def root(self, u): pu = self.state[u] if pu < 0: return u res = self.state[u] = self.root(pu) return res def merge(self, u, v): ru = self.root(u) rv = self.root(v) state = self.state if ru == rv: return if state[ru] > state[rv]: ru, rv = rv, ru if state[ru] == state[rv]: state[ru] -= 1 state[rv] = ru def ConvexHull(xy): def NG(x, y): x0, y0 = res[-2] x1, y1 = res[-1] return (x - x0) * (y1 - y0) - (x1 - x0) * (y - y0) >= 0 #if len(xy) < 3: return xy res = [] xy.sort(key=lambda p: (p[0], p[1])) for x, y in xy: while len(res) > 1 and NG(x, y): res.pop() res.append((x, y)) under_n = len(res) for x, y in xy[-2::-1]: while len(res) > under_n and NG(x, y): res.pop() res.append((x, y)) return res[:-1] def main(): n = II() # 例外処理 if n == 0: print(1) exit() # 負の座標が面倒なので10000を足して正にする # 座標平面を一辺10の正方形ゾーンに分割して、座標をゾーンごとに振り分ける zone = {} xy = [] for i in range(n): x, y = MI() x, y = x + 10000, y + 10000 xy.append((x, y)) x, y = x // 10, y // 10 zone.setdefault((x, y), []) zone[x, y].append(i) # print(zone) # 自分自身も含めて隣接9ゾーンで10km以内の座標同士を結合していく # 実際は未訪の5ゾーン(自分と上と右3つ)を調べればよい uf = UnionFind(n) for (zx, zy), ii in sorted(zone.items(), key=lambda k: (k[0], k[1])): for i in ii: ix, iy = xy[i] for nzx, nzy in [(zx, zy), (zx, zy + 1), (zx + 1, zy - 1), (zx + 1, zy), (zx + 1, zy + 1)]: if (nzx, nzy) not in zone: continue for j in zone[nzx, nzy]: if i == j: continue jx, jy = xy[j] if (ix - jx) ** 2 + (iy - jy) ** 2 <= 100: uf.merge(i, j) # 結合成分どうしでグループ分け rtoxy = defaultdict(list) for i in range(n): rtoxy[uf.root(i)].append(xy[i]) # print(rtoxy) # グループごとに最遠点を計算 ans = 0 for v in rtoxy.values(): if len(v) == 1: continue # 凸包を作る cnv=ConvexHull(v) #print(cnv) # 凸包の中で距離を全探索 for i, (ix, iy) in enumerate(cnv): for jx, jy in cnv[:i]: d = (ix - jx) ** 2 + (iy - jy) ** 2 if d > ans: ans = d print(ans ** 0.5 + 2) main()