import itertools

from math import *

n=int(eval(input()))

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

perms = list(itertools.permutations(ps, n))

dists = []

for i in range(len(perms)):

  dist = 0

  cur = perms[i][0]

  for j in range(1,len(perms[i])):

    d = sqrt((perms[i][j][0]-cur[0]) ** 2 + (perms[i][j][1]-cur[1])**2)

    cur = perms[i][j]

    dist += d



  dists.append(dist)

print((sum(dists)/len(perms)))
from math import sqrt

from itertools import permutations

N=int(eval(input()))

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

ans=0

cnt=0

for i in permutations(list(range(N))):

  d=0

  for j in range(N-1):

    dx=xy[i[j+1]][0]-xy[i[j]][0]

    dy=xy[i[j+1]][1]-xy[i[j]][1]

    d+=sqrt(dx**2+dy**2)

  ans+=d

  cnt+=1

print((ans/cnt))
import itertools
from math import *

n = int(eval(input()))
ps = [list(map(int, input().split())) for _ in range(n)]
perms = list(itertools.permutations(ps, n))
dists = []
for i in range(len(perms)):
    dist = 0
    cur = perms[i][0]
    for j in range(1, len(perms[i])):
        d = sqrt((perms[i][j][0] - cur[0]) ** 2 + (perms[i][j][1] - cur[1]) ** 2)
        cur = perms[i][j]
        dist += d
    dists.append(dist)
print((sum(dists) / len(perms)))

from math import sqrt
from itertools import permutations

N = int(eval(input()))
xy = [list(map(int, input().split())) for _ in range(N)]
ans = 0
cnt = 0
for i in permutations(list(range(N))):
    d = 0
    for j in range(N - 1):
        dx = xy[i[j + 1]][0] - xy[i[j]][0]
        dy = xy[i[j + 1]][1] - xy[i[j]][1]
        d += sqrt(dx**2 + dy**2)
    ans += d
    cnt += 1
print((ans / cnt))

-import itertools -from math import * +from math import sqrt +from itertools import permutations -n = int(eval(input())) -ps = [list(map(int, input().split())) for _ in range(n)] -perms = list(itertools.permutations(ps, n)) -dists = [] -for i in range(len(perms)): -    dist = 0 -    cur = perms[i][0] -    for j in range(1, len(perms[i])): -        d = sqrt((perms[i][j][0] - cur[0]) ** 2 + (perms[i][j][1] - cur[1]) ** 2) -        cur = perms[i][j] -        dist += d -    dists.append(dist) -print((sum(dists) / len(perms))) +N = int(eval(input())) +xy = [list(map(int, input().split())) for _ in range(N)] +ans = 0 +cnt = 0 +for i in permutations(list(range(N))): +    d = 0 +    for j in range(N - 1): +        dx = xy[i[j + 1]][0] - xy[i[j]][0] +        dy = xy[i[j + 1]][1] - xy[i[j]][1] +        d += sqrt(dx**2 + dy**2) +    ans += d +    cnt += 1 +print((ans / cnt))