from itertools import permutations as per

n=int(eval(input()))

ans=[]

l=list(per(list(range(1,n+1))))

xy=[[] for i in range(n+1)]

for i in range(n):

    x,y=list(map(int,input().split()))

    xy[i+1].append(x)

    xy[i+1].append(y)

def f(x):

    m=1

    while x>0:

        m*=x

        x=x-1

    return m

for i in range(f(n)):

    dis=0

    for j in range(n-1):

        dis+=((xy[l[i][j]][0]-xy[l[i][j+1]][0])**2+(xy[l[i][j]][1]-xy[l[i][j+1]][1])**2)**(0.5)

    ans.append(dis)

print((sum(ans)/f(n)))

    





n=int(eval(input()))

x=[]

y=[]

for i in range(n):

    a,b=list(map(int,input().split()))

    x.append(a)

    y.append(b)



p=1

for i in range(n):

    p*=i+1



def D(a,b):

    a=a-1

    b=b-1

    return ((x[a]-x[b])**2+(y[a]-y[b])**2)**(0.5)



def f(x):

    ans=0

    while x>0:

        ans+=x%2

        x=x//2

    return ans



def r(x):

    ans=1

    for i in range(x):

        ans*=(i+1)

    return ans



dp=[[0]*(n+1) for _ in range(2**n)]

for i in range(1,2**n):

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

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

            if (i>>(j-1))&1 and not (i>>(k-1)&1):

                dp[i+2**(k-1)][k]+=dp[i][j]+r((f(i)-1))*D(j,k)



print((sum(dp[2**n-1])/p))



from itertools import permutations as per

n = int(eval(input()))
ans = []
l = list(per(list(range(1, n + 1))))
xy = [[] for i in range(n + 1)]
for i in range(n):
    x, y = list(map(int, input().split()))
    xy[i + 1].append(x)
    xy[i + 1].append(y)


def f(x):
    m = 1
    while x > 0:
        m *= x
        x = x - 1
    return m


for i in range(f(n)):
    dis = 0
    for j in range(n - 1):
        dis += (
            (xy[l[i][j]][0] - xy[l[i][j + 1]][0]) ** 2
            + (xy[l[i][j]][1] - xy[l[i][j + 1]][1]) ** 2
        ) ** (0.5)
    ans.append(dis)
print((sum(ans) / f(n)))

n = int(eval(input()))
x = []
y = []
for i in range(n):
    a, b = list(map(int, input().split()))
    x.append(a)
    y.append(b)
p = 1
for i in range(n):
    p *= i + 1


def D(a, b):
    a = a - 1
    b = b - 1
    return ((x[a] - x[b]) ** 2 + (y[a] - y[b]) ** 2) ** (0.5)


def f(x):
    ans = 0
    while x > 0:
        ans += x % 2
        x = x // 2
    return ans


def r(x):
    ans = 1
    for i in range(x):
        ans *= i + 1
    return ans


dp = [[0] * (n + 1) for _ in range(2**n)]
for i in range(1, 2**n):
    for j in range(1, n + 1):
        for k in range(1, n + 1):
            if (i >> (j - 1)) & 1 and not (i >> (k - 1) & 1):
                dp[i + 2 ** (k - 1)][k] += dp[i][j] + r((f(i) - 1)) * D(j, k)
print((sum(dp[2**n - 1]) / p))

-from itertools import permutations as per +n = int(eval(input())) +x = [] +y = [] +for i in range(n): +    a, b = list(map(int, input().split())) +    x.append(a) +    y.append(b) +p = 1 +for i in range(n): +    p *= i + 1 -n = int(eval(input())) -ans = [] -l = list(per(list(range(1, n + 1)))) -xy = [[] for i in range(n + 1)] -for i in range(n): -    x, y = list(map(int, input().split())) -    xy[i + 1].append(x) -    xy[i + 1].append(y) + +def D(a, b): +    a = a - 1 +    b = b - 1 +    return ((x[a] - x[b]) ** 2 + (y[a] - y[b]) ** 2) ** (0.5) -    m = 1 +    ans = 0 -        m *= x -        x = x - 1 -    return m +        ans += x % 2 +        x = x // 2 +    return ans -for i in range(f(n)): -    dis = 0 -    for j in range(n - 1): -        dis += ( -            (xy[l[i][j]][0] - xy[l[i][j + 1]][0]) ** 2 -            + (xy[l[i][j]][1] - xy[l[i][j + 1]][1]) ** 2 -        ) ** (0.5) -    ans.append(dis) -print((sum(ans) / f(n))) +def r(x): +    ans = 1 +    for i in range(x): +        ans *= i + 1 +    return ans + + +dp = [[0] * (n + 1) for _ in range(2**n)] +for i in range(1, 2**n): +    for j in range(1, n + 1): +        for k in range(1, n + 1): +            if (i >> (j - 1)) & 1 and not (i >> (k - 1) & 1): +                dp[i + 2 ** (k - 1)][k] += dp[i][j] + r((f(i) - 1)) * D(j, k) +print((sum(dp[2**n - 1]) / p))