from collections import deque def check(x): G = [[] for _ in range(N)] for i in range(N): for j in range(i+1,N): d = (X[i]-X[j])**2 + (Y[i]-Y[j])**2 if d <= x: G[i].append(j) G[j].append(i) flg = [False] * N flg[0] = True Queue = deque() Queue.append(0) while Queue: pos = Queue.popleft() for nxt in G[pos]: if flg[nxt]: continue flg[nxt] = True Queue.append(nxt) return flg[-1] N = int(input()) Z = [list(map(int,input().split())) for _ in range(N)] X,Y = [list(i) for i in zip(*Z)] ng = 0 ok = 1<<32 while ok - ng > 1: x = (ok+ng) // 2 if check(x**2): ok = x else: ng = x ok = (ok + 9) // 10 * 10 print(ok)