import itertools

import math



n = int(eval(input()))

x_y = list(input().split() for i in range(n))

all = list(itertools.permutations(x_y))

l = 0

for i in all:

    for j in range(n-1):

        tmp = math.sqrt(math.pow(int(i[j][0])-int(i[j+1][0]), 2) + math.pow(int(i[j][1])-int(i[j+1][1]), 2))

        l += tmp



print((l/len(all)))
from itertools import permutations



n = int(eval(input()))

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



dist = 0

cnt = 0

for pattern in permutations(xy):

    cnt += 1

    for i in range(n - 1):

        x1, y1 = pattern[i]

        x2, y2 = pattern[i + 1]

        dist += pow(pow(x1 - x2, 2) + pow(y1 - y2, 2), 1 / 2)

res = dist / cnt

print(res)
import itertools
import math

n = int(eval(input()))
x_y = list(input().split() for i in range(n))
all = list(itertools.permutations(x_y))
l = 0
for i in all:
    for j in range(n - 1):
        tmp = math.sqrt(
            math.pow(int(i[j][0]) - int(i[j + 1][0]), 2)
            + math.pow(int(i[j][1]) - int(i[j + 1][1]), 2)
        )
        l += tmp
print((l / len(all)))

from itertools import permutations

n = int(eval(input()))
xy = [list(map(int, input().split())) for _ in range(n)]
dist = 0
cnt = 0
for pattern in permutations(xy):
    cnt += 1
    for i in range(n - 1):
        x1, y1 = pattern[i]
        x2, y2 = pattern[i + 1]
        dist += pow(pow(x1 - x2, 2) + pow(y1 - y2, 2), 1 / 2)
res = dist / cnt
print(res)

-import itertools -import math +from itertools import permutations -x_y = list(input().split() for i in range(n)) -all = list(itertools.permutations(x_y)) -l = 0 -for i in all: -    for j in range(n - 1): -        tmp = math.sqrt( -            math.pow(int(i[j][0]) - int(i[j + 1][0]), 2) -            + math.pow(int(i[j][1]) - int(i[j + 1][1]), 2) -        ) -        l += tmp -print((l / len(all))) +xy = [list(map(int, input().split())) for _ in range(n)] +dist = 0 +cnt = 0 +for pattern in permutations(xy): +    cnt += 1 +    for i in range(n - 1): +        x1, y1 = pattern[i] +        x2, y2 = pattern[i + 1] +        dist += pow(pow(x1 - x2, 2) + pow(y1 - y2, 2), 1 / 2) +res = dist / cnt +print(res)