N=int(eval(input()))



A=[input().split() for i in range(N)]

x=0

y=1

L=0

num=0

import itertools

import math

citylist=[0]*N

#０からN-1までのN要素のリスト生成

for j in range(N):

  citylist[j]=j



Plist=list(itertools.permutations(citylist))



for l in range(math.factorial(N)):

  L=0

  for k in range(N-1):

    L+=((int(A[Plist[l][k]][x])-int(A[Plist[l][k+1]][x]))**2+(int(A[Plist[l][k]][y])-int(A[Plist[l][k+1]][y]))**2)**(1/2)

  num+=L

  

print((num/math.factorial(N)))

N=int(eval(input()))

A=[]

for l in range(N):

  array = list(map(int, input().split()))

  A.append(array)

import math

import itertools as ir

x=0

y=1

#街u,vの距離

def distance(u,v):

  distance = math.sqrt( (A[u][x]-A[v][x])**2 + (A[u][y]-A[v][y])**2 )

  return distance

#街リストの生成（街0からN-1）

city_list=[]

for i in range(N):

  city_list.append(i)

#街のまわり方の並べ方

permutations=list(ir.permutations(city_list))

#距離の計算(一パターンを組み合わせ分だけ）

sum_distance=0

for j in range(math.factorial(N)):

  for k in range(N-1):

    sum_distance+=distance(permutations[j][k],permutations[j][k+1])

result=sum_distance/math.factorial(N)

print(result)

    
N = int(eval(input()))
A = [input().split() for i in range(N)]
x = 0
y = 1
L = 0
num = 0
import itertools
import math

citylist = [0] * N
# ０からN-1までのN要素のリスト生成
for j in range(N):
    citylist[j] = j
Plist = list(itertools.permutations(citylist))
for l in range(math.factorial(N)):
    L = 0
    for k in range(N - 1):
        L += (
            (int(A[Plist[l][k]][x]) - int(A[Plist[l][k + 1]][x])) ** 2
            + (int(A[Plist[l][k]][y]) - int(A[Plist[l][k + 1]][y])) ** 2
        ) ** (1 / 2)
    num += L
print((num / math.factorial(N)))

N = int(eval(input()))
A = []
for l in range(N):
    array = list(map(int, input().split()))
    A.append(array)
import math
import itertools as ir

x = 0
y = 1
# 街u,vの距離
def distance(u, v):
    distance = math.sqrt((A[u][x] - A[v][x]) ** 2 + (A[u][y] - A[v][y]) ** 2)
    return distance


# 街リストの生成（街0からN-1）
city_list = []
for i in range(N):
    city_list.append(i)
# 街のまわり方の並べ方
permutations = list(ir.permutations(city_list))
# 距離の計算(一パターンを組み合わせ分だけ）
sum_distance = 0
for j in range(math.factorial(N)):
    for k in range(N - 1):
        sum_distance += distance(permutations[j][k], permutations[j][k + 1])
result = sum_distance / math.factorial(N)
print(result)

-A = [input().split() for i in range(N)] +A = [] +for l in range(N): +    array = list(map(int, input().split())) +    A.append(array) +import math +import itertools as ir + -L = 0 -num = 0 -import itertools -import math +# 街u,vの距離 +def distance(u, v): +    distance = math.sqrt((A[u][x] - A[v][x]) ** 2 + (A[u][y] - A[v][y]) ** 2) +    return distance -citylist = [0] * N -# ０からN-1までのN要素のリスト生成 -for j in range(N): -    citylist[j] = j -Plist = list(itertools.permutations(citylist)) -for l in range(math.factorial(N)): -    L = 0 + +# 街リストの生成（街0からN-1） +city_list = [] +for i in range(N): +    city_list.append(i) +# 街のまわり方の並べ方 +permutations = list(ir.permutations(city_list)) +# 距離の計算(一パターンを組み合わせ分だけ） +sum_distance = 0 +for j in range(math.factorial(N)): -        L += ( -            (int(A[Plist[l][k]][x]) - int(A[Plist[l][k + 1]][x])) ** 2 -            + (int(A[Plist[l][k]][y]) - int(A[Plist[l][k + 1]][y])) ** 2 -        ) ** (1 / 2) -    num += L -print((num / math.factorial(N))) +        sum_distance += distance(permutations[j][k], permutations[j][k + 1]) +result = sum_distance / math.factorial(N) +print(result)