import numpy as np

from itertools import combinations

from itertools import permutations

from math import factorial





N = int(eval(input()))

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

cnt = 0



for i in xy:

    for j in xy:

        cnt += np.linalg.norm(i - j)

print((cnt / N))
N = int(eval(input()))

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

from math import hypot, factorial

distance = []



for i, j in D:

    for k, l in D:

        distance.append(hypot(i-k, j-l))



print((sum(distance)/N))



import numpy as np
from itertools import combinations
from itertools import permutations
from math import factorial

N = int(eval(input()))
xy = np.array([list(map(int, input().split())) for _ in range(N)])
cnt = 0
for i in xy:
    for j in xy:
        cnt += np.linalg.norm(i - j)
print((cnt / N))

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

distance = []
for i, j in D:
    for k, l in D:
        distance.append(hypot(i - k, j - l))
print((sum(distance) / N))

-import numpy as np -from itertools import combinations -from itertools import permutations -from math import factorial +N = int(eval(input())) +D = [list(map(int, input().split())) for _ in range(N)] +from math import hypot, factorial -N = int(eval(input())) -xy = np.array([list(map(int, input().split())) for _ in range(N)]) -cnt = 0 -for i in xy: -    for j in xy: -        cnt += np.linalg.norm(i - j) -print((cnt / N)) +distance = [] +for i, j in D: +    for k, l in D: +        distance.append(hypot(i - k, j - l)) +print((sum(distance) / N))