from itertools import permutations

import math

N = int(eval(input()))

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

city = list(permutations(xy))

all_len = 0

for i in city:

  sum_len = 0

  for j in range(1,N):

    sum_len += ((i[j][0]-i[j-1][0])**2 +(i[j][1]-i[j-1][1])**2)**0.5

  all_len += sum_len

print((all_len/len(city)))
import itertools



n = int(eval(input()))

town = [tuple(map(int,input().split())) for _ in range(n)]

c_town = list(itertools.combinations(town,2))

lp = len(list(itertools.permutations(town)))

sum_road = 0



for i in c_town:

  sum_road += ((i[0][0]-i[1][0])**2 + (i[0][1]-i[1][1])**2)**0.5

  

print((2*sum_road/n))
from itertools import permutations
import math

N = int(eval(input()))
xy = [tuple(map(int, input().split())) for _ in range(N)]
city = list(permutations(xy))
all_len = 0
for i in city:
    sum_len = 0
    for j in range(1, N):
        sum_len += ((i[j][0] - i[j - 1][0]) ** 2 + (i[j][1] - i[j - 1][1]) ** 2) ** 0.5
    all_len += sum_len
print((all_len / len(city)))

import itertools

n = int(eval(input()))
town = [tuple(map(int, input().split())) for _ in range(n)]
c_town = list(itertools.combinations(town, 2))
lp = len(list(itertools.permutations(town)))
sum_road = 0
for i in c_town:
    sum_road += ((i[0][0] - i[1][0]) ** 2 + (i[0][1] - i[1][1]) ** 2) ** 0.5
print((2 * sum_road / n))

-from itertools import permutations -import math +import itertools -N = int(eval(input())) -xy = [tuple(map(int, input().split())) for _ in range(N)] -city = list(permutations(xy)) -all_len = 0 -for i in city: -    sum_len = 0 -    for j in range(1, N): -        sum_len += ((i[j][0] - i[j - 1][0]) ** 2 + (i[j][1] - i[j - 1][1]) ** 2) ** 0.5 -    all_len += sum_len -print((all_len / len(city))) +n = int(eval(input())) +town = [tuple(map(int, input().split())) for _ in range(n)] +c_town = list(itertools.combinations(town, 2)) +lp = len(list(itertools.permutations(town))) +sum_road = 0 +for i in c_town: +    sum_road += ((i[0][0] - i[1][0]) ** 2 + (i[0][1] - i[1][1]) ** 2) ** 0.5 +print((2 * sum_road / n))