n = int(eval(input()))

X, Y= [0]*n,[0]*n



for i in range(n):

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

    X[i]=x

    Y[i]=y

    



def kaijo(x):

    if x==1:

        return 1

    else:

        return x*kaijo(x-1)



dis = 0.0

for i in range(n):

    for j in range(n):

        dis += (((X[i]-X[j])**2+(Y[i]-Y[j])**2)**0.5)*kaijo(n-1)





print((dis/kaijo(n)))
import numpy as np

n = int(eval(input()))

towns = []

for _ in range(n):

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

    towns.append((x,y))

dist = []

for i in range(n-1):

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

        x1,y1 = towns[i]

        x2,y2 = towns[j]

        dist.append(np.sqrt((x1-x2)**2+(y1-y2)**2))

print(((sum(dist)/len(dist)) * (n-1)))
n = int(eval(input()))
X, Y = [0] * n, [0] * n
for i in range(n):
    x, y = list(map(int, input().split()))
    X[i] = x
    Y[i] = y


def kaijo(x):
    if x == 1:
        return 1
    else:
        return x * kaijo(x - 1)


dis = 0.0
for i in range(n):
    for j in range(n):
        dis += (((X[i] - X[j]) ** 2 + (Y[i] - Y[j]) ** 2) ** 0.5) * kaijo(n - 1)
print((dis / kaijo(n)))

import numpy as np

n = int(eval(input()))
towns = []
for _ in range(n):
    x, y = list(map(int, input().split()))
    towns.append((x, y))
dist = []
for i in range(n - 1):
    for j in range(i + 1, n):
        x1, y1 = towns[i]
        x2, y2 = towns[j]
        dist.append(np.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2))
print(((sum(dist) / len(dist)) * (n - 1)))

+import numpy as np + -X, Y = [0] * n, [0] * n -for i in range(n): +towns = [] +for _ in range(n): -    X[i] = x -    Y[i] = y - - -def kaijo(x): -    if x == 1: -        return 1 -    else: -        return x * kaijo(x - 1) - - -dis = 0.0 -for i in range(n): -    for j in range(n): -        dis += (((X[i] - X[j]) ** 2 + (Y[i] - Y[j]) ** 2) ** 0.5) * kaijo(n - 1) -print((dis / kaijo(n))) +    towns.append((x, y)) +dist = [] +for i in range(n - 1): +    for j in range(i + 1, n): +        x1, y1 = towns[i] +        x2, y2 = towns[j] +        dist.append(np.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)) +print(((sum(dist) / len(dist)) * (n - 1)))