### C

from itertools import combinations

from math import factorial

from scipy.misc import comb



N = int(eval(input()))



x = []

y = []

for i in range(N):

    tmp = list(map(int, input().split()))

    x.append(tmp[0])

    y.append(tmp[1])



len_all = 0

for i, j in combinations(list(range(N)), 2):

    len_all += ((x[i]-x[j])**2+(y[i]-y[j])**2)**0.5

one_ave = len_all / comb(N,2)



print((one_ave*(N-1)))
#!/usr/bin/env python3



import itertools

import math



n = int(eval(input()))



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





sum_dis = 0

for i, j in itertools.permutations(list(range(n)), 2):

    x1, y1 = ab[i]

    x2, y2 = ab[j]

    sum_dis += ((x1-x2)**2+(y1-y2)**2)**0.5



sum_dis /= n*(n-1)/2



print((sum_dis*(n-1)/2))

### C
from itertools import combinations
from math import factorial
from scipy.misc import comb

N = int(eval(input()))
x = []
y = []
for i in range(N):
    tmp = list(map(int, input().split()))
    x.append(tmp[0])
    y.append(tmp[1])
len_all = 0
for i, j in combinations(list(range(N)), 2):
    len_all += ((x[i] - x[j]) ** 2 + (y[i] - y[j]) ** 2) ** 0.5
one_ave = len_all / comb(N, 2)
print((one_ave * (N - 1)))

#!/usr/bin/env python3
import itertools
import math

n = int(eval(input()))
ab = [list(map(int, input().split())) for i in range(n)]
sum_dis = 0
for i, j in itertools.permutations(list(range(n)), 2):
    x1, y1 = ab[i]
    x2, y2 = ab[j]
    sum_dis += ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5
sum_dis /= n * (n - 1) / 2
print((sum_dis * (n - 1) / 2))

-### C -from itertools import combinations -from math import factorial -from scipy.misc import comb +#!/usr/bin/env python3 +import itertools +import math -N = int(eval(input())) -x = [] -y = [] -for i in range(N): -    tmp = list(map(int, input().split())) -    x.append(tmp[0]) -    y.append(tmp[1]) -len_all = 0 -for i, j in combinations(list(range(N)), 2): -    len_all += ((x[i] - x[j]) ** 2 + (y[i] - y[j]) ** 2) ** 0.5 -one_ave = len_all / comb(N, 2) -print((one_ave * (N - 1))) +n = int(eval(input())) +ab = [list(map(int, input().split())) for i in range(n)] +sum_dis = 0 +for i, j in itertools.permutations(list(range(n)), 2): +    x1, y1 = ab[i] +    x2, y2 = ab[j] +    sum_dis += ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5 +sum_dis /= n * (n - 1) / 2 +print((sum_dis * (n - 1) / 2))