import sys; input = sys.stdin.buffer.readline sys.setrecursionlimit(10**7) from collections import defaultdict con = 10 ** 9 + 7; INF = float("inf") import math def getlist(): return list(map(int, input().split())) class UnionFind: def __init__(self, n): self.par = [i for i in range(n + 1)] self.rank = [0] * (n + 1) def find(self, x): if self.par[x] == x: return x else: self.par[x] = self.find(self.par[x]) return self.par[x] def same_check(self, x, y): return self.find(x) == self.find(y) def union(self, x, y): x = self.find(x); y = self.find(y) if self.rank[x] < self.rank[y]: self.par[x] = y else: self.par[y] = x if self.rank[x] == self.rank[y]: self.rank[x] += 1 #処理内容 def main(): N = int(input()) UF = UnionFind(N) node = [] edge = [] for i in range(N): X, Y = getlist() node.append([X, Y]) for i in range(N): for j in range(i + 1, N): x1, y1 = node[i] x2, y2 = node[j] edge.append([math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2) + 9.999999, i, j]) edge.sort() ans = INF for dist, i, j in edge: UF.union(i, j) if UF.same_check(0, N - 1): ans = int(dist // 10) * 10 break print(ans) if __name__ == '__main__': main()