import sys

from math import sqrt

input = sys.stdin.readline

N = int(eval(input()))

p = []

for _ in range(N):

  p.append(list(map(int, input().split())))

def dist(x1, y1, x2, y2):

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

res = 0

vis = set()

c = 0

def fact(n):

  r = 1

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

    r *= i

  return r

def dfs(n):

  global vis

  global res

  global c

  for x in range(N):

    if x in vis: continue

    vis.add(x)

    res += dist(p[n][0], p[n][1], p[x][0], p[x][1]) * fact(N - len(vis))

    dfs(x)

    vis.discard(x)

  if len(vis) == N: c += 1



for y in range(N):

  vis.add(y)

  dfs(y)

  vis.discard(y)





print((res / c))
import sys

from math import sqrt

from itertools import permutations as permi

input = sys.stdin.readline

N = int(eval(input()))

ps = []

for _ in range(N): 

  u, v = list(map(int, input().split()))

  ps.append((u, v))

res = 0

c = 0

for p in permi([x for x in range(N)], N):

  t = 0

  c += 1

  for i in range(N - 1):

    x = p[i]

    y = p[i + 1]

    t += sqrt((ps[x][0] - ps[y][0]) ** 2 + (ps[y][1] - ps[x][1]) ** 2)

  #print(t, p)

  res += t

print((res / c))
import sys
from math import sqrt

input = sys.stdin.readline
N = int(eval(input()))
p = []
for _ in range(N):
    p.append(list(map(int, input().split())))


def dist(x1, y1, x2, y2):
    return sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)


res = 0
vis = set()
c = 0


def fact(n):
    r = 1
    for i in range(1, n + 1):
        r *= i
    return r


def dfs(n):
    global vis
    global res
    global c
    for x in range(N):
        if x in vis:
            continue
        vis.add(x)
        res += dist(p[n][0], p[n][1], p[x][0], p[x][1]) * fact(N - len(vis))
        dfs(x)
        vis.discard(x)
    if len(vis) == N:
        c += 1


for y in range(N):
    vis.add(y)
    dfs(y)
    vis.discard(y)
print((res / c))

import sys
from math import sqrt
from itertools import permutations as permi

input = sys.stdin.readline
N = int(eval(input()))
ps = []
for _ in range(N):
    u, v = list(map(int, input().split()))
    ps.append((u, v))
res = 0
c = 0
for p in permi([x for x in range(N)], N):
    t = 0
    c += 1
    for i in range(N - 1):
        x = p[i]
        y = p[i + 1]
        t += sqrt((ps[x][0] - ps[y][0]) ** 2 + (ps[y][1] - ps[x][1]) ** 2)
    # print(t, p)
    res += t
print((res / c))

+from itertools import permutations as permi -p = [] +ps = [] -    p.append(list(map(int, input().split()))) - - -def dist(x1, y1, x2, y2): -    return sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2) - - +    u, v = list(map(int, input().split())) +    ps.append((u, v)) -vis = set() - - -def fact(n): -    r = 1 -    for i in range(1, n + 1): -        r *= i -    return r - - -def dfs(n): -    global vis -    global res -    global c -    for x in range(N): -        if x in vis: -            continue -        vis.add(x) -        res += dist(p[n][0], p[n][1], p[x][0], p[x][1]) * fact(N - len(vis)) -        dfs(x) -        vis.discard(x) -    if len(vis) == N: -        c += 1 - - -for y in range(N): -    vis.add(y) -    dfs(y) -    vis.discard(y) +for p in permi([x for x in range(N)], N): +    t = 0 +    c += 1 +    for i in range(N - 1): +        x = p[i] +        y = p[i + 1] +        t += sqrt((ps[x][0] - ps[y][0]) ** 2 + (ps[y][1] - ps[x][1]) ** 2) +    # print(t, p) +    res += t