import itertools

n = int(eval(input()))

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

routes = list(itertools.permutations(points))

ans = 0

for route in routes:

    for i in range(len(route)-1):

        x,y = route[i][0],route[i][1]

        a,b = route[i+1][0],route[i+1][1]

        ans += ((x-a)**2+(y-b)**2 )**(0.5)

ans /= len(routes)        

print(ans)
import itertools,math

n = int(eval(input()))

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

roots = list(itertools.permutations(points))

ans = 0

for root in roots:

    for i in range(n-1):

        ans += math.sqrt(pow(root[i+1][0] - root[i][0],2) + pow(root[i+1][1] - root[i][1],2))

ans /= len(roots)

print(ans)
import itertools

n = int(eval(input()))
points = [list(map(int, input().split())) for _ in range(n)]
routes = list(itertools.permutations(points))
ans = 0
for route in routes:
    for i in range(len(route) - 1):
        x, y = route[i][0], route[i][1]
        a, b = route[i + 1][0], route[i + 1][1]
        ans += ((x - a) ** 2 + (y - b) ** 2) ** (0.5)
ans /= len(routes)
print(ans)

import itertools, math

n = int(eval(input()))
points = [list(map(int, input().split())) for _ in range(n)]
roots = list(itertools.permutations(points))
ans = 0
for root in roots:
    for i in range(n - 1):
        ans += math.sqrt(
            pow(root[i + 1][0] - root[i][0], 2) + pow(root[i + 1][1] - root[i][1], 2)
        )
ans /= len(roots)
print(ans)

-import itertools +import itertools, math -routes = list(itertools.permutations(points)) +roots = list(itertools.permutations(points)) -for route in routes: -    for i in range(len(route) - 1): -        x, y = route[i][0], route[i][1] -        a, b = route[i + 1][0], route[i + 1][1] -        ans += ((x - a) ** 2 + (y - b) ** 2) ** (0.5) -ans /= len(routes) +for root in roots: +    for i in range(n - 1): +        ans += math.sqrt( +            pow(root[i + 1][0] - root[i][0], 2) + pow(root[i + 1][1] - root[i][1], 2) +        ) +ans /= len(roots)