def Prim_dense(g): n = len(g) INF = 2*10**18 + 5 smallest = [INF]*n # 頂点 i から到達できる使用済みの点までの距離の最小値 smallest[0] = 0 used = [0]*n ans = 0 for i in range(n): v = -1 d = INF for j in range(n): if used[j]==0 and smallest[j] < d: v = j d = smallest[j] ans = max(ans,d) if v==-1: #非連結 return None break if v==n-1: return ans used[v] = 1 for j in range(n): if used[j]==0 and smallest[j] > g[v][j]: smallest[j] = g[v][j] #return sum(smallest) return smallest[-1] n = int(input()) xy = [list(map(int,input().split())) for _ in range(n)] g = [[(xi-xj)**2+(yi-yj)**2 for xj,yj in xy] for xi,yi in xy] d = Prim_dense(g) r = int(d**0.5) v = max(0,(r-3)//10*10) for i in range(v,v+100,10): if i*i >= d: print(i) break