import itertools

import math



def dist(s, g):

    sx, sy = s

    ex, ey = g



    return math.sqrt((ex - sx)**2 + (ey - sy)**2)



# input

n = int(eval(input()))

points = [ [int(x) for x in input().split()] for _ in range(n) ]



# calculate roots

roots = set(itertools.permutations(list(range(n))))



distance = [0] * len(roots)

idn = 0

for root in roots:

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

        tmp_dist = dist(points[root[i]], points[root[i + 1]])

        distance[idn] += tmp_dist

    

    idn += 1



print((sum(distance) / len(distance)))

import itertools

import math



def main():

    N = int(eval(input()))



    xys = [[int(y) for y in input().split()] for _ in range(N)]



    routes = itertools.permutations(xys, len(xys))



    sumup = 0

    count = 0 # cuz len(routes) doesn't work :(

    for route in routes:

        count += 1

        for i in range(1, N):

            xy_0 = route[i - 1]

            xy_1 = route[i]

            sumup += math.sqrt((xy_0[0] - xy_1[0]) ** 2 + (xy_0[1] - xy_1[1]) ** 2)



    print((sumup / count))



if __name__ == "__main__":

    main()
import itertools
import math


def dist(s, g):
    sx, sy = s
    ex, ey = g
    return math.sqrt((ex - sx) ** 2 + (ey - sy) ** 2)


# input
n = int(eval(input()))
points = [[int(x) for x in input().split()] for _ in range(n)]
# calculate roots
roots = set(itertools.permutations(list(range(n))))
distance = [0] * len(roots)
idn = 0
for root in roots:
    for i in range(len(root) - 1):
        tmp_dist = dist(points[root[i]], points[root[i + 1]])
        distance[idn] += tmp_dist
    idn += 1
print((sum(distance) / len(distance)))

import itertools
import math


def main():
    N = int(eval(input()))
    xys = [[int(y) for y in input().split()] for _ in range(N)]
    routes = itertools.permutations(xys, len(xys))
    sumup = 0
    count = 0  # cuz len(routes) doesn't work :(
    for route in routes:
        count += 1
        for i in range(1, N):
            xy_0 = route[i - 1]
            xy_1 = route[i]
            sumup += math.sqrt((xy_0[0] - xy_1[0]) ** 2 + (xy_0[1] - xy_1[1]) ** 2)
    print((sumup / count))


if __name__ == "__main__":
    main()

-def dist(s, g): -    sx, sy = s -    ex, ey = g -    return math.sqrt((ex - sx) ** 2 + (ey - sy) ** 2) +def main(): +    N = int(eval(input())) +    xys = [[int(y) for y in input().split()] for _ in range(N)] +    routes = itertools.permutations(xys, len(xys)) +    sumup = 0 +    count = 0  # cuz len(routes) doesn't work :( +    for route in routes: +        count += 1 +        for i in range(1, N): +            xy_0 = route[i - 1] +            xy_1 = route[i] +            sumup += math.sqrt((xy_0[0] - xy_1[0]) ** 2 + (xy_0[1] - xy_1[1]) ** 2) +    print((sumup / count)) -# input -n = int(eval(input())) -points = [[int(x) for x in input().split()] for _ in range(n)] -# calculate roots -roots = set(itertools.permutations(list(range(n)))) -distance = [0] * len(roots) -idn = 0 -for root in roots: -    for i in range(len(root) - 1): -        tmp_dist = dist(points[root[i]], points[root[i + 1]]) -        distance[idn] += tmp_dist -    idn += 1 -print((sum(distance) / len(distance))) +if __name__ == "__main__": +    main()