import math

import itertools



N = int(eval(input()))

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

l = [i for i in range(N)]

ans = 0

for v in itertools.permutations(l,N):

    for i in range(N):

        if i==0:x,y = X[v[i]]

        else:

            x2,y2 = X[v[i]]

            ans+=math.sqrt((x-x2)**2+(y-y2)**2)

            x,y = x2,y2

print((ans/math.factorial(N)))
from math import factorial as fac

from math import sqrt

from collections import deque

N = int(eval(input()))

X = []

for i in range(N):

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

    X.append((x,y))

ans = 0

Q = deque()

for i in range(N):

    Q.append((0,[i],X[i][0],X[i][1]))

while Q:

    S,L,x,y = Q.pop()

    if len(L)==N:

        ans += S

        continue

    for i in range(N):

        if not(i in L):

            h,w = X[i]

            Q.append((S+sqrt(pow(x-h,2)+pow(y-w,2)),L+[i],h,w))

print((ans/fac(N)))
import math
import itertools

N = int(eval(input()))
X = [list(map(int, input().split())) for i in range(N)]
l = [i for i in range(N)]
ans = 0
for v in itertools.permutations(l, N):
    for i in range(N):
        if i == 0:
            x, y = X[v[i]]
        else:
            x2, y2 = X[v[i]]
            ans += math.sqrt((x - x2) ** 2 + (y - y2) ** 2)
            x, y = x2, y2
print((ans / math.factorial(N)))

from math import factorial as fac
from math import sqrt
from collections import deque

N = int(eval(input()))
X = []
for i in range(N):
    x, y = list(map(int, input().split()))
    X.append((x, y))
ans = 0
Q = deque()
for i in range(N):
    Q.append((0, [i], X[i][0], X[i][1]))
while Q:
    S, L, x, y = Q.pop()
    if len(L) == N:
        ans += S
        continue
    for i in range(N):
        if not (i in L):
            h, w = X[i]
            Q.append((S + sqrt(pow(x - h, 2) + pow(y - w, 2)), L + [i], h, w))
print((ans / fac(N)))

-import math -import itertools +from math import factorial as fac +from math import sqrt +from collections import deque -X = [list(map(int, input().split())) for i in range(N)] -l = [i for i in range(N)] +X = [] +for i in range(N): +    x, y = list(map(int, input().split())) +    X.append((x, y)) -for v in itertools.permutations(l, N): +Q = deque() +for i in range(N): +    Q.append((0, [i], X[i][0], X[i][1])) +while Q: +    S, L, x, y = Q.pop() +    if len(L) == N: +        ans += S +        continue -        if i == 0: -            x, y = X[v[i]] -        else: -            x2, y2 = X[v[i]] -            ans += math.sqrt((x - x2) ** 2 + (y - y2) ** 2) -            x, y = x2, y2 -print((ans / math.factorial(N))) +        if not (i in L): +            h, w = X[i] +            Q.append((S + sqrt(pow(x - h, 2) + pow(y - w, 2)), L + [i], h, w)) +print((ans / fac(N)))