import math

def calc(now,points,length,M,ans):

  if len(points)==0:

    #print(length).

    ans.append(length)

    return 0

  for i in range(len(points)):

    #print(points,points[:i]+points[i+1:])

    tmp=length + math.sqrt( ((now[0]-M[points[i]][0])**2) + ((now[1]-M[points[i]][1])**2) )

    #print(tmp)

    #return length + calc(M[points[i]],points[:i]+points[i+1:],tmp,M)

    calc(M[points[i]],points[:i]+points[i+1:],tmp,M,ans)

n=int(eval(input()))

M=[]

for i in range(n):

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

ans=[]

points=[]

num=1

for i in range(n):

  points.append(i)

  num=num*(i+1)

for i in range(n):

  #print(i,points[:i]+points[i+1:])

  #ans.append(calc(M[i],points[:i]+points[i+1:],0.0,M))

  calc(M[i],points[:i]+points[i+1:],0.0,M,ans)

#print(ans)

print((sum(ans)/num))
import itertools

import math



N=int(eval(input()))

X=[]

Y=[]

dist=[ [ 0 for j in range(N) ] for i in range(N) ]

for n in range(N):

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

  X.append(x)

  Y.append(y)



for i in range(N):

  for j in range(N):

    dist[i][j]=math.sqrt( (X[i]-X[j])**2 + (Y[i]-Y[j])**2 )



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

P=itertools.permutations(l,N)

ans=0

for p in P:

  p=list(p)

  for i in range(N-1):

    ans+=dist[p[i]][p[i+1]]

print((ans/math.factorial(N)))
import math


def calc(now, points, length, M, ans):
    if len(points) == 0:
        # print(length).
        ans.append(length)
        return 0
    for i in range(len(points)):
        # print(points,points[:i]+points[i+1:])
        tmp = length + math.sqrt(
            ((now[0] - M[points[i]][0]) ** 2) + ((now[1] - M[points[i]][1]) ** 2)
        )
        # print(tmp)
        # return length + calc(M[points[i]],points[:i]+points[i+1:],tmp,M)
        calc(M[points[i]], points[:i] + points[i + 1 :], tmp, M, ans)


n = int(eval(input()))
M = []
for i in range(n):
    M.append(list(map(int, input().split())))
ans = []
points = []
num = 1
for i in range(n):
    points.append(i)
    num = num * (i + 1)
for i in range(n):
    # print(i,points[:i]+points[i+1:])
    # ans.append(calc(M[i],points[:i]+points[i+1:],0.0,M))
    calc(M[i], points[:i] + points[i + 1 :], 0.0, M, ans)
# print(ans)
print((sum(ans) / num))

import itertools
import math

N = int(eval(input()))
X = []
Y = []
dist = [[0 for j in range(N)] for i in range(N)]
for n in range(N):
    x, y = list(map(int, input().split()))
    X.append(x)
    Y.append(y)
for i in range(N):
    for j in range(N):
        dist[i][j] = math.sqrt((X[i] - X[j]) ** 2 + (Y[i] - Y[j]) ** 2)
l = [i for i in range(N)]
P = itertools.permutations(l, N)
ans = 0
for p in P:
    p = list(p)
    for i in range(N - 1):
        ans += dist[p[i]][p[i + 1]]
print((ans / math.factorial(N)))

+import itertools - -def calc(now, points, length, M, ans): -    if len(points) == 0: -        # print(length). -        ans.append(length) -        return 0 -    for i in range(len(points)): -        # print(points,points[:i]+points[i+1:]) -        tmp = length + math.sqrt( -            ((now[0] - M[points[i]][0]) ** 2) + ((now[1] - M[points[i]][1]) ** 2) -        ) -        # print(tmp) -        # return length + calc(M[points[i]],points[:i]+points[i+1:],tmp,M) -        calc(M[points[i]], points[:i] + points[i + 1 :], tmp, M, ans) - - -n = int(eval(input())) -M = [] -for i in range(n): -    M.append(list(map(int, input().split()))) -ans = [] -points = [] -num = 1 -for i in range(n): -    points.append(i) -    num = num * (i + 1) -for i in range(n): -    # print(i,points[:i]+points[i+1:]) -    # ans.append(calc(M[i],points[:i]+points[i+1:],0.0,M)) -    calc(M[i], points[:i] + points[i + 1 :], 0.0, M, ans) -# print(ans) -print((sum(ans) / num)) +N = int(eval(input())) +X = [] +Y = [] +dist = [[0 for j in range(N)] for i in range(N)] +for n in range(N): +    x, y = list(map(int, input().split())) +    X.append(x) +    Y.append(y) +for i in range(N): +    for j in range(N): +        dist[i][j] = math.sqrt((X[i] - X[j]) ** 2 + (Y[i] - Y[j]) ** 2) +l = [i for i in range(N)] +P = itertools.permutations(l, N) +ans = 0 +for p in P: +    p = list(p) +    for i in range(N - 1): +        ans += dist[p[i]][p[i + 1]] +print((ans / math.factorial(N)))