import sys sys.setrecursionlimit(10 ** 6) from bisect import * from collections import * from heapq import * import math int1 = lambda x: int(x) - 1 p2D = lambda x: print(*x, sep="\n") def II(): return int(sys.stdin.readline()) def SI(): return sys.stdin.readline()[:-1] def MI(): return map(int, sys.stdin.readline().split()) def MI1(): return map(int1, sys.stdin.readline().split()) def MF(): return map(float, sys.stdin.readline().split()) def LI(): return list(map(int, sys.stdin.readline().split())) def LI1(): return list(map(int1, sys.stdin.readline().split())) def LF(): return list(map(float, sys.stdin.readline().split())) def LLI(rows_number): return [LI() for _ in range(rows_number)] dij = [(0, 1), (1, 0), (0, -1), (-1, 0)] def main(): def cald(d): s=max(math.ceil(d**0.5)//10*10-20,0) for x in range(s,s+100,10): if x**2>=d:return x n=II() xy=[] to=defaultdict(list) for i in range(n): x0,y0=MI() for j,(x,y) in enumerate(xy): d=(x0-x)**2+(y0-y)**2 to[i].append((j,d)) to[j].append((i,d)) xy.append((x0,y0)) fin=[False]*n hp=[] heappush(hp,[0,0]) while hp: d,i=heappop(hp) if i==n-1: print(cald(d)) exit() if fin[i]:continue fin[i]=True for j,c in to[i]: if fin[j]:continue heappush(hp,[max(d,c),j]) main()