fun main(args: Array<String>) = println(run {
    val n = readLine()!!.toInt()
    val p = (1..n).map { readLine()!!.split(" ").map { it.toInt() } }
    val d = Array(n){DoubleArray(n)}
    for (i in 0..n-1) {
        for (j in 0..n-1) {
            val dx = (p[i][0]-p[j][0]).toDouble()
            val dy = (p[i][1]-p[j][1]).toDouble()
            d[i][j] = Math.sqrt(dx*dx+dy*dy)
        }
    }

    val used = BooleanArray(n)
    val perm = IntArray(n)
    val perms = mutableListOf<IntArray>()
    fun generatePermutation(index: Int) {
        if (index > perm.lastIndex) {
            perms.add(perm.copyOf())
            return
        } else {
            (0 until n).filter { !used[it] }.forEach {
                used[it] = true
                perm[index] = it
                generatePermutation(index+1)
                used[it] = false
            }
        }
    }

    generatePermutation(0)
    
    perms.map { perm ->
        (1 until n).map { d[perm[it-1]][perm[it]] }.sum()
    }.average()

})