def d(a,b):

    return ((a[0]-b[0])**2+(a[1]-b[1])**2)**(.5)

n = int(input())

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

s = 0

for i in range(n):

    for j in range(n):

        if i !=j:

            s += d(l[i],l[j])

print(s/n)
n = int(input())

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

print(sum(((l[i][0]-l[j][0])**2+(l[i][1]-l[j][1])**2)**(.5) for i in range(n) for j in range(n) if i !=j)/n)
def d(a, b):
    return ((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2) ** (0.5)


n = int(input())
l = [list(map(int, input().split())) for i in range(n)]
s = 0
for i in range(n):
    for j in range(n):
        if i != j:
            s += d(l[i], l[j])
print(s / n)

n = int(input())
l = [list(map(int, input().split())) for i in range(n)]
print(
    sum(
        ((l[i][0] - l[j][0]) ** 2 + (l[i][1] - l[j][1]) ** 2) ** (0.5)
        for i in range(n)
        for j in range(n)
        if i != j
    )
    / n
)

-def d(a, b): -    return ((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2) ** (0.5) - - -s = 0 -for i in range(n): -    for j in range(n): -        if i != j: -            s += d(l[i], l[j]) -print(s / n) +print( +    sum( +        ((l[i][0] - l[j][0]) ** 2 + (l[i][1] - l[j][1]) ** 2) ** (0.5) +        for i in range(n) +        for j in range(n) +        if i != j +    ) +    / n +)