from decimal import Decimal def sq_dist(p1, p2): return (p1[0]-p2[0])**2+(p1[1]-p2[1])**2 def ascend(anc, anc_i): rec = [] while anc[anc_i] != anc_i: rec.append(anc_i) anc_i = anc[anc_i] for i in rec[:-1]: anc[i] = anc_i return anc_i def connect(anc, a, b): a_anc = ascend(anc,a) b_anc = ascend(anc,b) if a_anc != b_anc: anc[a_anc] = b_anc def check(mid): anc = range(N) for i in xrange(N-1): for j in xrange(i+1,N): if mid >= d[i][j-i-1]: connect(anc,i,j) return ascend(anc,0) == ascend(anc,N-1) N = int(raw_input()) xy = [map(int,raw_input().split()) for i in xrange(N)] d = [[sq_dist(xy[i],xy[j]) for j in xrange(i+1,N)] for i in xrange(N-1)] l = 0 r = sq_dist(xy[0],xy[N-1]) while r - l > 1: mid = (r + l) / 2 if check(mid): r = mid else: l = mid max_d = Decimal(r).sqrt() print (int(max_d)+(max_d>int(max_d))+9) / 10 * 10