import itertools

import numpy as np



def distance(x2,x1,y2,y1):

    return ((x2-x1)**2 + (y2-y1)**2)**0.5



N = int(eval(input()))

X = []

Y = []

for _ in range(N):

    x, y = list(map(int, input().split()))

    X.append(x)

    Y.append(y)



routes = list(itertools.permutations(list(range(N)), N))

ans = []



for route in routes:

    dist = 0

    for i in range(1, N):

        dist += distance(X[route[i]], X[route[i-1]], Y[route[i]], Y[route[i-1]])

    ans.append(dist)



print((np.mean(ans)))

import numpy as np



N = int(eval(input()))

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

XY = np.array(xy).flatten()



X = XY[::2] ; Y = XY[1::2]



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

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



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



answer = dist_mat.sum() / N

print(answer)

import itertools
import numpy as np


def distance(x2, x1, y2, y1):
    return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5


N = int(eval(input()))
X = []
Y = []
for _ in range(N):
    x, y = list(map(int, input().split()))
    X.append(x)
    Y.append(y)
routes = list(itertools.permutations(list(range(N)), N))
ans = []
for route in routes:
    dist = 0
    for i in range(1, N):
        dist += distance(X[route[i]], X[route[i - 1]], Y[route[i]], Y[route[i - 1]])
    ans.append(dist)
print((np.mean(ans)))

import numpy as np

N = int(eval(input()))
xy = [list(map(int, input().split())) for _ in range(N)]
XY = np.array(xy).flatten()
X = XY[::2]
Y = XY[1::2]
dx = X[:, None] - X[None, :]
dy = Y[:, None] - Y[None, :]
dist_mat = (dx * dx + dy * dy) ** 0.5
answer = dist_mat.sum() / N
print(answer)

-import itertools - -def distance(x2, x1, y2, y1): -    return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5 - - -X = [] -Y = [] -for _ in range(N): -    x, y = list(map(int, input().split())) -    X.append(x) -    Y.append(y) -routes = list(itertools.permutations(list(range(N)), N)) -ans = [] -for route in routes: -    dist = 0 -    for i in range(1, N): -        dist += distance(X[route[i]], X[route[i - 1]], Y[route[i]], Y[route[i - 1]]) -    ans.append(dist) -print((np.mean(ans))) +xy = [list(map(int, input().split())) for _ in range(N)] +XY = np.array(xy).flatten() +X = XY[::2] +Y = XY[1::2] +dx = X[:, None] - X[None, :] +dy = Y[:, None] - Y[None, :] +dist_mat = (dx * dx + dy * dy) ** 0.5 +answer = dist_mat.sum() / N +print(answer)