from itertools import permutations

from math import sqrt

n = int(eval(input()))

x = [0] * n

y = [0] * n

for i in range(n):

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



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

c = 0

d = 0.0

for a in permutations(p):

    c += 1

    for i in range(n - 1):

        d += sqrt((x[a[i]] - x[a[i + 1]]) ** 2 + (y[a[i]] - y[a[i + 1]]) ** 2)

print(("{:10f}".format(d / c)))

from itertools import permutations

from math import sqrt

n = int(eval(input()))

x = [0] * n

y = [0] * n

for i in range(n):

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



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

c = 0

d = 0.0

dp = [[0.0 for _ in range(n)] for _ in range(n)]

for a in permutations(p):

    c += 1

    for i in range(n - 1):

        if dp[a[i]][a[i + 1]] == 0.0:

            dp[a[i]][a[i + 1]] = sqrt((x[a[i]] - x[a[i + 1]]) ** 2 + (y[a[i]] - y[a[i + 1]]) ** 2)

        d += dp[a[i]][a[i + 1]]

print(("{:10f}".format(d / c)))

from itertools import permutations
from math import sqrt

n = int(eval(input()))
x = [0] * n
y = [0] * n
for i in range(n):
    x[i], y[i] = list(map(int, input().split()))
p = [i for i in range(n)]
c = 0
d = 0.0
for a in permutations(p):
    c += 1
    for i in range(n - 1):
        d += sqrt((x[a[i]] - x[a[i + 1]]) ** 2 + (y[a[i]] - y[a[i + 1]]) ** 2)
print(("{:10f}".format(d / c)))

from itertools import permutations
from math import sqrt

n = int(eval(input()))
x = [0] * n
y = [0] * n
for i in range(n):
    x[i], y[i] = list(map(int, input().split()))
p = [i for i in range(n)]
c = 0
d = 0.0
dp = [[0.0 for _ in range(n)] for _ in range(n)]
for a in permutations(p):
    c += 1
    for i in range(n - 1):
        if dp[a[i]][a[i + 1]] == 0.0:
            dp[a[i]][a[i + 1]] = sqrt(
                (x[a[i]] - x[a[i + 1]]) ** 2 + (y[a[i]] - y[a[i + 1]]) ** 2
            )
        d += dp[a[i]][a[i + 1]]
print(("{:10f}".format(d / c)))

+dp = [[0.0 for _ in range(n)] for _ in range(n)] -        d += sqrt((x[a[i]] - x[a[i + 1]]) ** 2 + (y[a[i]] - y[a[i + 1]]) ** 2) +        if dp[a[i]][a[i + 1]] == 0.0: +            dp[a[i]][a[i + 1]] = sqrt( +                (x[a[i]] - x[a[i + 1]]) ** 2 + (y[a[i]] - y[a[i + 1]]) ** 2 +            ) +        d += dp[a[i]][a[i + 1]]