import itertools,math,numpy as np

def I(): return int(eval(input()))

def LI(): return list(map(int,input().split()))

N = I()

xy = np.array(sorted([LI() for _ in range(N)]))

sum_norm = 0

dict_norm = {}

for a in itertools.permutations(list(range(N))):

    for i in range(len(a)-1):

        vector = tuple(xy[a[i+1]]-xy[a[i]])

        if not vector in dict_norm:

            dict_norm[vector] = np.linalg.norm(vector)

        sum_norm += dict_norm[vector]

print((sum_norm/math.factorial(N)))

import numpy as np

def I(): return int(eval(input()))

def LI(): return list(map(int,input().split()))

N = I()

xy = np.array([LI() for _ in range(N)])

sum_norm = 0

for i in range(N):

    for j in range(i,N):

        sum_norm += np.linalg.norm(xy[j]-xy[i])

print((2*sum_norm/N))

import itertools, math, numpy as np


def I():
    return int(eval(input()))


def LI():
    return list(map(int, input().split()))


N = I()
xy = np.array(sorted([LI() for _ in range(N)]))
sum_norm = 0
dict_norm = {}
for a in itertools.permutations(list(range(N))):
    for i in range(len(a) - 1):
        vector = tuple(xy[a[i + 1]] - xy[a[i]])
        if not vector in dict_norm:
            dict_norm[vector] = np.linalg.norm(vector)
        sum_norm += dict_norm[vector]
print((sum_norm / math.factorial(N)))

import numpy as np


def I():
    return int(eval(input()))


def LI():
    return list(map(int, input().split()))


N = I()
xy = np.array([LI() for _ in range(N)])
sum_norm = 0
for i in range(N):
    for j in range(i, N):
        sum_norm += np.linalg.norm(xy[j] - xy[i])
print((2 * sum_norm / N))

-import itertools, math, numpy as np +import numpy as np -xy = np.array(sorted([LI() for _ in range(N)])) +xy = np.array([LI() for _ in range(N)]) -dict_norm = {} -for a in itertools.permutations(list(range(N))): -    for i in range(len(a) - 1): -        vector = tuple(xy[a[i + 1]] - xy[a[i]]) -        if not vector in dict_norm: -            dict_norm[vector] = np.linalg.norm(vector) -        sum_norm += dict_norm[vector] -print((sum_norm / math.factorial(N))) +for i in range(N): +    for j in range(i, N): +        sum_norm += np.linalg.norm(xy[j] - xy[i]) +print((2 * sum_norm / N))