import math

import itertools



N = int(eval(input()))



lst = []

for i in range(N):

    lst.append(list(map(int, input().split())))



routes = list(itertools.permutations(lst))



def distance(a, b):

    return (((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2)) ** 0.5



routes = [i for i in routes]

distancies = []

for i, r in enumerate(routes):

    for j, a in enumerate(r):

        if j >= len(r) - 1: break

        b = r[j + 1]

        ab_dist = distance(a, b)

        distancies.append(ab_dist)



print((sum(distancies) / len(routes)))
import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines

 

import numpy as np

 

N = int(readline())

XY = np.array(read().split(),np.int64)

 

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 math
import itertools

N = int(eval(input()))
lst = []
for i in range(N):
    lst.append(list(map(int, input().split())))
routes = list(itertools.permutations(lst))


def distance(a, b):
    return (((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2)) ** 0.5


routes = [i for i in routes]
distancies = []
for i, r in enumerate(routes):
    for j, a in enumerate(r):
        if j >= len(r) - 1:
            break
        b = r[j + 1]
        ab_dist = distance(a, b)
        distancies.append(ab_dist)
print((sum(distancies) / len(routes)))

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
import numpy as np

N = int(readline())
XY = np.array(read().split(), np.int64)
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 math -import itertools +import sys -N = int(eval(input())) -lst = [] -for i in range(N): -    lst.append(list(map(int, input().split()))) -routes = list(itertools.permutations(lst)) +read = sys.stdin.buffer.read +readline = sys.stdin.buffer.readline +readlines = sys.stdin.buffer.readlines +import numpy as np - -def distance(a, b): -    return (((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2)) ** 0.5 - - -routes = [i for i in routes] -distancies = [] -for i, r in enumerate(routes): -    for j, a in enumerate(r): -        if j >= len(r) - 1: -            break -        b = r[j + 1] -        ab_dist = distance(a, b) -        distancies.append(ab_dist) -print((sum(distancies) / len(routes))) +N = int(readline()) +XY = np.array(read().split(), np.int64) +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)