import sys

import numpy as np

from math import factorial, sqrt

from itertools import permutations

read = sys.stdin.read

readline = sys.stdin.readline



N = int(readline())

xy = np.array(read().split(), np.int64).reshape(N, 2)

distance = [[0.0] * N for _ in range(N)]



for i in range(N - 1):

    for j in range(i + 1, N):

        tmp = sqrt(np.sum((xy[i] - xy[j]) ** 2))

        distance[j][i] = tmp

        distance[i][j] = tmp



answer = 0

for i in permutations(list(range(N))):

    for j in range(N - 1):

        answer += distance[i[j]][i[j + 1]]



print((answer / factorial(N)))
import sys

from math import sqrt

read = sys.stdin.read



N, *xy = list(map(int, read().split()))

x = xy[::2]; y = xy[1::2]



distance = []



for i in range(N - 1):

    for j in range(i + 1, N):

        distance.append(sqrt((x[i] - x[j]) ** 2 + (y[i] - y[j]) ** 2))



print((sum(distance) / N * 2))
import sys
import numpy as np
from math import factorial, sqrt
from itertools import permutations

read = sys.stdin.read
readline = sys.stdin.readline
N = int(readline())
xy = np.array(read().split(), np.int64).reshape(N, 2)
distance = [[0.0] * N for _ in range(N)]
for i in range(N - 1):
    for j in range(i + 1, N):
        tmp = sqrt(np.sum((xy[i] - xy[j]) ** 2))
        distance[j][i] = tmp
        distance[i][j] = tmp
answer = 0
for i in permutations(list(range(N))):
    for j in range(N - 1):
        answer += distance[i[j]][i[j + 1]]
print((answer / factorial(N)))

import sys
from math import sqrt

read = sys.stdin.read
N, *xy = list(map(int, read().split()))
x = xy[::2]
y = xy[1::2]
distance = []
for i in range(N - 1):
    for j in range(i + 1, N):
        distance.append(sqrt((x[i] - x[j]) ** 2 + (y[i] - y[j]) ** 2))
print((sum(distance) / N * 2))

-import numpy as np -from math import factorial, sqrt -from itertools import permutations +from math import sqrt -readline = sys.stdin.readline -N = int(readline()) -xy = np.array(read().split(), np.int64).reshape(N, 2) -distance = [[0.0] * N for _ in range(N)] +N, *xy = list(map(int, read().split())) +x = xy[::2] +y = xy[1::2] +distance = [] -        tmp = sqrt(np.sum((xy[i] - xy[j]) ** 2)) -        distance[j][i] = tmp -        distance[i][j] = tmp -answer = 0 -for i in permutations(list(range(N))): -    for j in range(N - 1): -        answer += distance[i[j]][i[j + 1]] -print((answer / factorial(N))) +        distance.append(sqrt((x[i] - x[j]) ** 2 + (y[i] - y[j]) ** 2)) +print((sum(distance) / N * 2))