import itertools



n = int(eval(input()))

lis = []

keep = [0, 1, 2, 3, 4, 5, 6, 7, 8]

keep = list(itertools.permutations(keep[:n]))

for i in range(n):

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

    lis.append(s)

ans = 0

re_ans = 0

for j in range(len(keep)):

    for k in range(n - 1):

        ans = ((lis[keep[j][k]][0] - lis[keep[j][k + 1]][0])**2 +

               (lis[keep[j][k]][1] - lis[keep[j][k + 1]][1])**2)**(1 / 2)

        re_ans += ans

print((re_ans / len(keep)))
import itertools



n = int(eval(input()))

lis = []

for i in range(n):

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

    lis.append((x, y))



LIS = [i for i in range(n)]



big_lis = list(itertools.permutations(LIS))

L = len(big_lis)





def sai(i, j):

    return (lis[A[i + 1]][j] - lis[A[i]][j]) ** 2





keep = 0

ANS = 0

for i in range(L):

    A = list(big_lis[i])

    keep = 0

    for j in range(n - 1):

        keep += (sai(j, 0) + sai(j, 1)) ** (1 / 2)

    ANS += keep

print((ANS / L))

import itertools

n = int(eval(input()))
lis = []
keep = [0, 1, 2, 3, 4, 5, 6, 7, 8]
keep = list(itertools.permutations(keep[:n]))
for i in range(n):
    s = list(map(int, input().split()))
    lis.append(s)
ans = 0
re_ans = 0
for j in range(len(keep)):
    for k in range(n - 1):
        ans = (
            (lis[keep[j][k]][0] - lis[keep[j][k + 1]][0]) ** 2
            + (lis[keep[j][k]][1] - lis[keep[j][k + 1]][1]) ** 2
        ) ** (1 / 2)
        re_ans += ans
print((re_ans / len(keep)))

import itertools

n = int(eval(input()))
lis = []
for i in range(n):
    x, y = list(map(int, input().split()))
    lis.append((x, y))
LIS = [i for i in range(n)]
big_lis = list(itertools.permutations(LIS))
L = len(big_lis)


def sai(i, j):
    return (lis[A[i + 1]][j] - lis[A[i]][j]) ** 2


keep = 0
ANS = 0
for i in range(L):
    A = list(big_lis[i])
    keep = 0
    for j in range(n - 1):
        keep += (sai(j, 0) + sai(j, 1)) ** (1 / 2)
    ANS += keep
print((ANS / L))

-keep = [0, 1, 2, 3, 4, 5, 6, 7, 8] -keep = list(itertools.permutations(keep[:n])) -    s = list(map(int, input().split())) -    lis.append(s) -ans = 0 -re_ans = 0 -for j in range(len(keep)): -    for k in range(n - 1): -        ans = ( -            (lis[keep[j][k]][0] - lis[keep[j][k + 1]][0]) ** 2 -            + (lis[keep[j][k]][1] - lis[keep[j][k + 1]][1]) ** 2 -        ) ** (1 / 2) -        re_ans += ans -print((re_ans / len(keep))) +    x, y = list(map(int, input().split())) +    lis.append((x, y)) +LIS = [i for i in range(n)] +big_lis = list(itertools.permutations(LIS)) +L = len(big_lis) + + +def sai(i, j): +    return (lis[A[i + 1]][j] - lis[A[i]][j]) ** 2 + + +keep = 0 +ANS = 0 +for i in range(L): +    A = list(big_lis[i]) +    keep = 0 +    for j in range(n - 1): +        keep += (sai(j, 0) + sai(j, 1)) ** (1 / 2) +    ANS += keep +print((ANS / L))