N = int(eval(input()))

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



import math



dist = [[0] * N for _ in range(N)]

for i in range(N - 1):

    xi, yi = xy[i]

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

        xj, yj = xy[j]

        dist[i][j] = math.sqrt((xi - xj) ** 2 + (yi - yj) ** 2)

        dist[j][i] = dist[i][j]



import itertools



ans = 0

cases = list(itertools.permutations(list(range(N))))

for case in cases:

    for idx in range(N - 1):

        ans += dist[case[idx]][case[idx + 1]]

ans /= len(cases)



print(ans)
N = int(eval(input()))

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



import math



dist_sum = 0

for i in range(N):

    xi, yi = xy[i]

    for j in range(N):

        xj, yj = xy[j]

        dist_sum += math.sqrt((xi - xj) ** 2 + (yi - yj) ** 2)



print((dist_sum / N))
N = int(eval(input()))
xy = [list(map(int, input().split())) for _ in range(N)]
import math

dist = [[0] * N for _ in range(N)]
for i in range(N - 1):
    xi, yi = xy[i]
    for j in range(i + 1, N):
        xj, yj = xy[j]
        dist[i][j] = math.sqrt((xi - xj) ** 2 + (yi - yj) ** 2)
        dist[j][i] = dist[i][j]
import itertools

ans = 0
cases = list(itertools.permutations(list(range(N))))
for case in cases:
    for idx in range(N - 1):
        ans += dist[case[idx]][case[idx + 1]]
ans /= len(cases)
print(ans)

N = int(eval(input()))
xy = [list(map(int, input().split())) for _ in range(N)]
import math

dist_sum = 0
for i in range(N):
    xi, yi = xy[i]
    for j in range(N):
        xj, yj = xy[j]
        dist_sum += math.sqrt((xi - xj) ** 2 + (yi - yj) ** 2)
print((dist_sum / N))

-dist = [[0] * N for _ in range(N)] -for i in range(N - 1): +dist_sum = 0 +for i in range(N): -    for j in range(i + 1, N): +    for j in range(N): -        dist[i][j] = math.sqrt((xi - xj) ** 2 + (yi - yj) ** 2) -        dist[j][i] = dist[i][j] -import itertools - -ans = 0 -cases = list(itertools.permutations(list(range(N)))) -for case in cases: -    for idx in range(N - 1): -        ans += dist[case[idx]][case[idx + 1]] -ans /= len(cases) -print(ans) +        dist_sum += math.sqrt((xi - xj) ** 2 + (yi - yj) ** 2) +print((dist_sum / N))