import numpy as np

import itertools

import math



def l2_norm(node1,node2):

    x1 = node1[0]

    y1 = node1[1]

    x2 = node2[0]

    y2 = node2[1]

    return math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)



def pmt(n):

    result = 1

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

        result = result * i

    return result

node_num = int(eval(input()))



node_list = []

dist_list = []



# for i in itertools.permutations([i for i in range(3)]):

for i in range(node_num):

    a, b =  list(map(float,input().split()))

    node_list.append((a,b))

for i in itertools.combinations([i for i in range(node_num)],2):

    node1 = node_list[i[0]]

    node2 = node_list[i[1]]

    dist_list.append(l2_norm(node1, node2))



tmp_list = []

for i in itertools.permutations([i for i in range(node_num)]):

    tmp_list.append("".join(map(str, i)))



count = 0

for i in tmp_list:

    if i.find("01") >= 0:

        count = count + 1

    if i.find("10") >= 0:

        count = count + 1



dist = np.asarray(dist_list)

dist = dist * count

dist = dist.sum()

dist = dist / pmt(node_num)

print(dist)
import math

import itertools

import numpy as np

def l2_dist(a,b):

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

def rate(n):

    if n == 1:

        return 2

    else:

        return n * rate(n - 1) 

def fact(n):

    if n == 1 or n == 0:

        return 1

    else:

        return n * fact(n - 1)

n = int(eval(input()))

point_list = []

for i in range(n):

    point_list.append(tuple(map(float,input().split(' '))))

dist_list = []

for i in itertools.combinations([i for i in range(n)], 2):

    dist_list.append(l2_dist(point_list[i[0]],point_list[i[1]]))

r = rate(n - 1) if n > 2 else 1

f = fact(n) if n > 2 else 1

dist_list = np.asarray(dist_list) * r

print((dist_list.sum() / f))
import numpy as np
import itertools
import math


def l2_norm(node1, node2):
    x1 = node1[0]
    y1 = node1[1]
    x2 = node2[0]
    y2 = node2[1]
    return math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)


def pmt(n):
    result = 1
    for i in range(1, n + 1):
        result = result * i
    return result


node_num = int(eval(input()))
node_list = []
dist_list = []
# for i in itertools.permutations([i for i in range(3)]):
for i in range(node_num):
    a, b = list(map(float, input().split()))
    node_list.append((a, b))
for i in itertools.combinations([i for i in range(node_num)], 2):
    node1 = node_list[i[0]]
    node2 = node_list[i[1]]
    dist_list.append(l2_norm(node1, node2))
tmp_list = []
for i in itertools.permutations([i for i in range(node_num)]):
    tmp_list.append("".join(map(str, i)))
count = 0
for i in tmp_list:
    if i.find("01") >= 0:
        count = count + 1
    if i.find("10") >= 0:
        count = count + 1
dist = np.asarray(dist_list)
dist = dist * count
dist = dist.sum()
dist = dist / pmt(node_num)
print(dist)

import math
import itertools
import numpy as np


def l2_dist(a, b):
    return math.sqrt((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2)


def rate(n):
    if n == 1:
        return 2
    else:
        return n * rate(n - 1)


def fact(n):
    if n == 1 or n == 0:
        return 1
    else:
        return n * fact(n - 1)


n = int(eval(input()))
point_list = []
for i in range(n):
    point_list.append(tuple(map(float, input().split(" "))))
dist_list = []
for i in itertools.combinations([i for i in range(n)], 2):
    dist_list.append(l2_dist(point_list[i[0]], point_list[i[1]]))
r = rate(n - 1) if n > 2 else 1
f = fact(n) if n > 2 else 1
dist_list = np.asarray(dist_list) * r
print((dist_list.sum() / f))

+import math +import itertools -import itertools -import math -def l2_norm(node1, node2): -    x1 = node1[0] -    y1 = node1[1] -    x2 = node2[0] -    y2 = node2[1] -    return math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2) +def l2_dist(a, b): +    return math.sqrt((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2) -def pmt(n): -    result = 1 -    for i in range(1, n + 1): -        result = result * i -    return result +def rate(n): +    if n == 1: +        return 2 +    else: +        return n * rate(n - 1) -node_num = int(eval(input())) -node_list = [] +def fact(n): +    if n == 1 or n == 0: +        return 1 +    else: +        return n * fact(n - 1) + + +n = int(eval(input())) +point_list = [] +for i in range(n): +    point_list.append(tuple(map(float, input().split(" ")))) -# for i in itertools.permutations([i for i in range(3)]): -for i in range(node_num): -    a, b = list(map(float, input().split())) -    node_list.append((a, b)) -for i in itertools.combinations([i for i in range(node_num)], 2): -    node1 = node_list[i[0]] -    node2 = node_list[i[1]] -    dist_list.append(l2_norm(node1, node2)) -tmp_list = [] -for i in itertools.permutations([i for i in range(node_num)]): -    tmp_list.append("".join(map(str, i))) -count = 0 -for i in tmp_list: -    if i.find("01") >= 0: -        count = count + 1 -    if i.find("10") >= 0: -        count = count + 1 -dist = np.asarray(dist_list) -dist = dist * count -dist = dist.sum() -dist = dist / pmt(node_num) -print(dist) +for i in itertools.combinations([i for i in range(n)], 2): +    dist_list.append(l2_dist(point_list[i[0]], point_list[i[1]])) +r = rate(n - 1) if n > 2 else 1 +f = fact(n) if n > 2 else 1 +dist_list = np.asarray(dist_list) * r +print((dist_list.sum() / f))