from itertools import permutations



def calc(x, y):

    return ((x[0] - y[0])**2 + (x[1] - y[1])**2)**0.5



def main():

    n = int(eval(input()))

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

    A = list(permutations(A))

    ls = []

    for c in A:

        l = calc(c[0], c[1])

        if len(c) > 2:

            prev_idx = 1

            for a in c[2:]:

                l += calc(c[prev_idx], a)

                prev_idx += 1

        ls.append(l)

    print((sum(ls) / len(ls)))





if __name__ == "__main__":

    main()
from itertools import permutations





def main():

    N = int(eval(input()))

    cities = [i for i in range(N)]

    xys = []

    for _ in range(N):

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



    combs = list(permutations(cities))

    sum_dist = 0

    for comb in combs:

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

            idx1 = comb[i]

            idx2 = comb[i+1]

            sum_dist += (

                (xys[idx1][0] - xys[idx2][0]) ** 2 +

                (xys[idx1][1] - xys[idx2][1]) ** 2) ** 0.5

    print((sum_dist / len(combs)))





if __name__ == '__main__':

    main()

from itertools import permutations


def calc(x, y):
    return ((x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2) ** 0.5


def main():
    n = int(eval(input()))
    A = [list(map(int, input().split())) for i in range(n)]
    A = list(permutations(A))
    ls = []
    for c in A:
        l = calc(c[0], c[1])
        if len(c) > 2:
            prev_idx = 1
            for a in c[2:]:
                l += calc(c[prev_idx], a)
                prev_idx += 1
        ls.append(l)
    print((sum(ls) / len(ls)))


if __name__ == "__main__":
    main()

from itertools import permutations


def main():
    N = int(eval(input()))
    cities = [i for i in range(N)]
    xys = []
    for _ in range(N):
        xys.append(list(map(int, input().split())))
    combs = list(permutations(cities))
    sum_dist = 0
    for comb in combs:
        for i in range(len(comb) - 1):
            idx1 = comb[i]
            idx2 = comb[i + 1]
            sum_dist += (
                (xys[idx1][0] - xys[idx2][0]) ** 2 + (xys[idx1][1] - xys[idx2][1]) ** 2
            ) ** 0.5
    print((sum_dist / len(combs)))


if __name__ == "__main__":
    main()

-def calc(x, y): -    return ((x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2) ** 0.5 - - -    n = int(eval(input())) -    A = [list(map(int, input().split())) for i in range(n)] -    A = list(permutations(A)) -    ls = [] -    for c in A: -        l = calc(c[0], c[1]) -        if len(c) > 2: -            prev_idx = 1 -            for a in c[2:]: -                l += calc(c[prev_idx], a) -                prev_idx += 1 -        ls.append(l) -    print((sum(ls) / len(ls))) +    N = int(eval(input())) +    cities = [i for i in range(N)] +    xys = [] +    for _ in range(N): +        xys.append(list(map(int, input().split()))) +    combs = list(permutations(cities)) +    sum_dist = 0 +    for comb in combs: +        for i in range(len(comb) - 1): +            idx1 = comb[i] +            idx2 = comb[i + 1] +            sum_dist += ( +                (xys[idx1][0] - xys[idx2][0]) ** 2 + (xys[idx1][1] - xys[idx2][1]) ** 2 +            ) ** 0.5 +    print((sum_dist / len(combs)))