from itertools import permutations

import math



n = int(eval(input()))

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

m = math.factorial(n)

p = list(permutations(l))

d = 0



for i in range(m):

    for j in range(n-1):

        x = p[i][j][0] - p[i][j-1][0]

        y = p[i][j][1] - p[i][j-1][1]

        d += math.sqrt(x**2 + y**2)



print((d/m))
n = int(eval(input()))

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



d = 0

for x, y in l:

    for z, w in l:

        d += ((x-z)**2+(y-w)**2)**0.5

print((d/n))
from itertools import permutations
import math

n = int(eval(input()))
l = [list(map(int, input().split())) for _ in range(n)]
m = math.factorial(n)
p = list(permutations(l))
d = 0
for i in range(m):
    for j in range(n - 1):
        x = p[i][j][0] - p[i][j - 1][0]
        y = p[i][j][1] - p[i][j - 1][1]
        d += math.sqrt(x**2 + y**2)
print((d / m))

n = int(eval(input()))
l = [list(map(int, input().split())) for _ in range(n)]
d = 0
for x, y in l:
    for z, w in l:
        d += ((x - z) ** 2 + (y - w) ** 2) ** 0.5
print((d / n))

-from itertools import permutations -import math - -m = math.factorial(n) -p = list(permutations(l)) -for i in range(m): -    for j in range(n - 1): -        x = p[i][j][0] - p[i][j - 1][0] -        y = p[i][j][1] - p[i][j - 1][1] -        d += math.sqrt(x**2 + y**2) -print((d / m)) +for x, y in l: +    for z, w in l: +        d += ((x - z) ** 2 + (y - w) ** 2) ** 0.5 +print((d / n))