from heapq import heappush, heappop import math def d2(p1, p2): return (p1[0] - p2[0]) ** 2 + (p1[1] - p2[1]) ** 2 def dij(n, ps): start = 0 goal = n - 1 d2mat = [[0] * n for i in range(n)] pset = set(range(n)) for i in range(n): for j in range(i + 1, n): d2mat[i][j] = d2mat[j][i] = d2(ps[i], ps[j]) d = [d2mat[start][i] for i in range(n)] hq = [] for i in range(n): heappush(hq, (d[i], i)) while hq: m, i = heappop(hq) if d[i] < m: continue if i == goal: return m pset.remove(i) for j in pset: dij = d2mat[i][j] mj = max(m, dij) if d[j] > mj: d[j] = mj heappush(hq, (mj, j)) return d[goal] def solve(n, ps): ans = dij(n, ps) a2 = math.sqrt(ans) c = math.ceil(a2 / 10) return min(filter(lambda a: (a * 10) ** 2 >= ans, [c - 1, c, c + 1])) * 10 def main(): n = int(input()) ps = [] for i in range(n): x, y = list(map(int, input().split())) ps.append((x, y)) print(solve(n, ps)) if __name__ == '__main__': main()