from itertools import permutations as perm



n = int(eval(input()))

l = []

for i in range(n):

    x,y = list(map(int,input().split()))

    l.append([x, y])



sm = 0

cnt = 0



permm = list(range(n))

for p in perm(permm):

    for i, j in zip(p, p[1:]):

        x1, y1 = l[i]

        x2, y2 = l[j]

        sm += ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5

    cnt += 1



print((sm / cnt))
n = int(eval(input()))

l = []

for i in range(n):

    x,y = list(map(int,input().split()))

    l.append([x, y])



sm = 0

for i in range(n):

    for j in range(n):

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

print((sm / n))
from itertools import permutations as perm

n = int(eval(input()))
l = []
for i in range(n):
    x, y = list(map(int, input().split()))
    l.append([x, y])
sm = 0
cnt = 0
permm = list(range(n))
for p in perm(permm):
    for i, j in zip(p, p[1:]):
        x1, y1 = l[i]
        x2, y2 = l[j]
        sm += ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5
    cnt += 1
print((sm / cnt))

n = int(eval(input()))
l = []
for i in range(n):
    x, y = list(map(int, input().split()))
    l.append([x, y])
sm = 0
for i in range(n):
    for j in range(n):
        sm += ((l[i][0] - l[j][0]) ** 2 + (l[i][1] - l[j][1]) ** 2) ** 0.5
print((sm / n))

-from itertools import permutations as perm - -cnt = 0 -permm = list(range(n)) -for p in perm(permm): -    for i, j in zip(p, p[1:]): -        x1, y1 = l[i] -        x2, y2 = l[j] -        sm += ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5 -    cnt += 1 -print((sm / cnt)) +for i in range(n): +    for j in range(n): +        sm += ((l[i][0] - l[j][0]) ** 2 + (l[i][1] - l[j][1]) ** 2) ** 0.5 +print((sm / n))