from math import sqrt
n=int(input())
arr=[[10] for i in range(n)]
ans=100000000
for i in range(n):
arr[i]=input().split()
arr[i]=[int(j) for j in arr[i]]
def DFS(depth,last):
global ans
if depth>n:
return
for i in range(n):
if i>=last and i!=last*2:
ans=min(sqrt((arr[last][0]-arr[i-last][0])*(arr[last][0]-arr[i-last][0])+(arr[last][1]-arr[i-last][1])*(arr[last][1]-arr[i-last][1])),ans)
DFS(depth+1,last+1)
DFS(1,1)
print('%.4f'%ans)