import math

from itertools import permutations

N = int(eval(input()))

A = [tuple(map(int, input().split())) for _ in range(N)]

P = list(permutations(A))

ans = 0

count = 0

for p in P:  

  count += 1

  for i in range(1,len(p)):

    ans += math.sqrt((p[i-1][0]-p[i][0])**2 + (p[i-1][1]-p[i][1])**2)        

print((ans/count))  

  

import numpy as np

 

N = int(eval(input()))

A = [input().split() for _ in range(N)]

# sum(A, []) 次元をフラット化

XY = np.array(sum(A, []),np.int64)



X = XY[::2] # x部分

Y = XY[1::2] # y部分

# Noneで次元を追加 X[:, None] shap(N,1)

dx = X[:,None] - X[None,:] 

dy = Y[:,None] - Y[None,:]



dist_mat = (dx*dx + dy*dy)**.5

ans = dist_mat.sum() / N

print(ans)
import math
from itertools import permutations

N = int(eval(input()))
A = [tuple(map(int, input().split())) for _ in range(N)]
P = list(permutations(A))
ans = 0
count = 0
for p in P:
    count += 1
    for i in range(1, len(p)):
        ans += math.sqrt((p[i - 1][0] - p[i][0]) ** 2 + (p[i - 1][1] - p[i][1]) ** 2)
print((ans / count))

import numpy as np

N = int(eval(input()))
A = [input().split() for _ in range(N)]
# sum(A, []) 次元をフラット化
XY = np.array(sum(A, []), np.int64)
X = XY[::2]  # x部分
Y = XY[1::2]  # y部分
# Noneで次元を追加 X[:, None] shap(N,1)
dx = X[:, None] - X[None, :]
dy = Y[:, None] - Y[None, :]
dist_mat = (dx * dx + dy * dy) ** 0.5
ans = dist_mat.sum() / N
print(ans)

-import math -from itertools import permutations +import numpy as np -A = [tuple(map(int, input().split())) for _ in range(N)] -P = list(permutations(A)) -ans = 0 -count = 0 -for p in P: -    count += 1 -    for i in range(1, len(p)): -        ans += math.sqrt((p[i - 1][0] - p[i][0]) ** 2 + (p[i - 1][1] - p[i][1]) ** 2) -print((ans / count)) +A = [input().split() for _ in range(N)] +# sum(A, []) 次元をフラット化 +XY = np.array(sum(A, []), np.int64) +X = XY[::2]  # x部分 +Y = XY[1::2]  # y部分 +# Noneで次元を追加 X[:, None] shap(N,1) +dx = X[:, None] - X[None, :] +dy = Y[:, None] - Y[None, :] +dist_mat = (dx * dx + dy * dy) ** 0.5 +ans = dist_mat.sum() / N +print(ans)