import math

import itertools





N = int(eval(input()))



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



result = 0

count = 0

permutation_list = itertools.permutations([x for x in range(N)])

for data in permutation_list:

    count += 1

    for i in range(1, len(data)):

        result += math.sqrt((array[data[i]][0] - array[data[i - 1]][0]) ** 2 +

                            (array[data[i]][1] - array[data[i - 1]][1]) ** 2)

print((result / count))

import math

import itertools





N = int(eval(input()))



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



result = 0

count = 0

permutation_list = itertools.permutations([x for x in range(N)])



calc = [[0] * 10 for i in range(10)]

for i in range(N):

    for j in range(N):

        calc[i][j] = math.sqrt((array[i][0] - array[j][0]) ** 2 +

                               (array[i][1] - array[j][1]) ** 2)

        calc[j][i] = math.sqrt((array[i][0] - array[j][0]) ** 2 +

                               (array[i][1] - array[j][1]) ** 2)



for data in permutation_list:

    count += 1

    for i in range(1, len(data)):

        result += calc[data[i - 1]][data[i]]

print((result / count))

import math
import itertools

N = int(eval(input()))
array = [list(map(int, input().split())) for _ in range(N)]
result = 0
count = 0
permutation_list = itertools.permutations([x for x in range(N)])
for data in permutation_list:
    count += 1
    for i in range(1, len(data)):
        result += math.sqrt(
            (array[data[i]][0] - array[data[i - 1]][0]) ** 2
            + (array[data[i]][1] - array[data[i - 1]][1]) ** 2
        )
print((result / count))

import math
import itertools

N = int(eval(input()))
array = [list(map(int, input().split())) for _ in range(N)]
result = 0
count = 0
permutation_list = itertools.permutations([x for x in range(N)])
calc = [[0] * 10 for i in range(10)]
for i in range(N):
    for j in range(N):
        calc[i][j] = math.sqrt(
            (array[i][0] - array[j][0]) ** 2 + (array[i][1] - array[j][1]) ** 2
        )
        calc[j][i] = math.sqrt(
            (array[i][0] - array[j][0]) ** 2 + (array[i][1] - array[j][1]) ** 2
        )
for data in permutation_list:
    count += 1
    for i in range(1, len(data)):
        result += calc[data[i - 1]][data[i]]
print((result / count))

+calc = [[0] * 10 for i in range(10)] +for i in range(N): +    for j in range(N): +        calc[i][j] = math.sqrt( +            (array[i][0] - array[j][0]) ** 2 + (array[i][1] - array[j][1]) ** 2 +        ) +        calc[j][i] = math.sqrt( +            (array[i][0] - array[j][0]) ** 2 + (array[i][1] - array[j][1]) ** 2 +        ) -        result += math.sqrt( -            (array[data[i]][0] - array[data[i - 1]][0]) ** 2 -            + (array[data[i]][1] - array[data[i - 1]][1]) ** 2 -        ) +        result += calc[data[i - 1]][data[i]]