import itertools

import math

import statistics





def main():

    N = int(eval(input()))

    city_lst = [list(map(int, input().split())) for _ in range(N)]

    d_lst = [0] * math.factorial(N)



    for i, route in enumerate(itertools.permutations(list(range(N)))):

        for j in range(len(route) - 1):

            d = math.sqrt((city_lst[route[j + 1]][0] - city_lst[route[j]][0])

                          ** 2 + (city_lst[route[j + 1]][1] - city_lst[route[j]][1]) ** 2)

            d_lst[i] += d



    print(f"{statistics.mean(d_lst):.10f}")





if __name__ == "__main__":

    main()

from itertools import permutations

from math import factorial





def main():

    n = int(eval(input()))

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

    ans = 0



    for p in permutations(list(range(n)), n):

        dist = 0

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

            dist += (abs(xy[p[i]][0] - xy[p[i + 1]][0]) ** 2 +

                     abs(xy[p[i]][1] - xy[p[i + 1]][1]) ** 2) ** 0.5

        ans += dist



    ans /= factorial(n)



    print(f"{ans:.12f}")





if __name__ == "__main__":

    main()

import itertools
import math
import statistics


def main():
    N = int(eval(input()))
    city_lst = [list(map(int, input().split())) for _ in range(N)]
    d_lst = [0] * math.factorial(N)
    for i, route in enumerate(itertools.permutations(list(range(N)))):
        for j in range(len(route) - 1):
            d = math.sqrt(
                (city_lst[route[j + 1]][0] - city_lst[route[j]][0]) ** 2
                + (city_lst[route[j + 1]][1] - city_lst[route[j]][1]) ** 2
            )
            d_lst[i] += d
    print(f"{statistics.mean(d_lst):.10f}")


if __name__ == "__main__":
    main()

from itertools import permutations
from math import factorial


def main():
    n = int(eval(input()))
    xy = [list(map(int, input().split())) for _ in range(n)]
    ans = 0
    for p in permutations(list(range(n)), n):
        dist = 0
        for i in range(len(p) - 1):
            dist += (
                abs(xy[p[i]][0] - xy[p[i + 1]][0]) ** 2
                + abs(xy[p[i]][1] - xy[p[i + 1]][1]) ** 2
            ) ** 0.5
        ans += dist
    ans /= factorial(n)
    print(f"{ans:.12f}")


if __name__ == "__main__":
    main()

-import itertools -import math -import statistics +from itertools import permutations +from math import factorial -    N = int(eval(input())) -    city_lst = [list(map(int, input().split())) for _ in range(N)] -    d_lst = [0] * math.factorial(N) -    for i, route in enumerate(itertools.permutations(list(range(N)))): -        for j in range(len(route) - 1): -            d = math.sqrt( -                (city_lst[route[j + 1]][0] - city_lst[route[j]][0]) ** 2 -                + (city_lst[route[j + 1]][1] - city_lst[route[j]][1]) ** 2 -            ) -            d_lst[i] += d -    print(f"{statistics.mean(d_lst):.10f}") +    n = int(eval(input())) +    xy = [list(map(int, input().split())) for _ in range(n)] +    ans = 0 +    for p in permutations(list(range(n)), n): +        dist = 0 +        for i in range(len(p) - 1): +            dist += ( +                abs(xy[p[i]][0] - xy[p[i + 1]][0]) ** 2 +                + abs(xy[p[i]][1] - xy[p[i + 1]][1]) ** 2 +            ) ** 0.5 +        ans += dist +    ans /= factorial(n) +    print(f"{ans:.12f}")