from math import sqrt class UnionFind: def __init__(self, n: int): self.data = [-1] * (n+1) self.nexts = [i for i in range(n+1)] def root(self, a: int) -> int: if self.data[a] < 0: return a self.data[a] = self.root(self.data[a]) return self.data[a] def unite(self, a: int, b: int) -> bool: pa = self.root(a) pb = self.root(b) if pa == pb: return False if self.data[pa] > self.data[pb]: pa, pb = pb, pa self.data[pa] += self.data[pb] # pa を pb をつなげる self.data[pb] = pa self.nexts[pa], self.nexts[pb] = self.nexts[pb], self.nexts[pa] return True def issame(self, a: int, b: int) -> bool: return self.root(a) == self.root(b) def size(self, a: int) -> int: """a が属する集合のサイズ""" return -self.data[self.root(a)] def group(self, a: int): """a が属する集合""" yield a x = a while self.nexts[x] != a: x = self.nexts[x] yield x def dist2(a, b): return (a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2 N = int(input()) ps = [] for _ in range(N): X, Y = map(int, input().split()) ps.append((X, Y)) uf = UnionFind(N) for i in range(N): for j in range(i+1, N): d = dist2(ps[i], ps[j]) if d <= 10**2: uf.unite(i, j) ans = 1 if N == 0 else 2 for i in range(N): for j in range(i+1, N): if uf.issame(i, j): d = sqrt(dist2(ps[i], ps[j])) ans = max(ans, d + 2) print(ans)