import java.lang.Math.pow
import java.lang.Math.sqrt

fun main() {
    class Permutation<T:Comparable<T>> (private var li: List<T>){

        val size_li:Int
        val size_e:Int
        val sortedList: List<List<T>>
        val invMap: Map<List<T>, Int>
        private var is_setting:Boolean =false
        var now: List<T>
            set(value){
                if (is_setting){
                    field=value
                }else{
                    this.setting(value = value)
                }
            }
        var ind:Int
            set(value){
                if (is_setting){
                    field=value
                }else{
                    this.setting(index = value)
                }

            }

        init {
            this.is_setting=true
            this.now= listOf<T>()
            this.ind=-1
            this.size_li=this.fact(li.size)
            this.size_e=li.size
            this.sortedList=this.getList(li.sorted()).toList()
            this.invMap= this.getMap().toMap()
            this.setting(value = li)
        }

        private fun setting(index:Int?=null, value:List<T>?=null){
            this.is_setting=true
            if (index!==null) {this.ind= index; this.now=this.sortedList[index]}
            if (value!==null) {this.now= value; this.ind= this.invMap[value] ?: error("out of map")}
            this.is_setting=false
        }
        fun next():Boolean{
            this.ind =(this.ind+1)%this.size_li
            this.now=this.sortedList[this.ind]
            return this.ind != 0
        }
        fun prev():Boolean{
            this.ind=(this.ind-1+this.size_li)%this.size_li
            this.now=this.sortedList[this.ind]
            return this.ind!=this.size_li-1
        }
        private fun getList(li_before: List<T>, li_after: List<T> =listOf<T>(), tmp_ans: MutableList<List<T>> =mutableListOf<List<T>>()): MutableList<List<T>>{
            var ans:MutableList<List<T>> =mutableListOf<List<T>>()
            if (li_before.size<=1){
                tmp_ans.add(li_after+li_before)
                ans= tmp_ans
            }else{
                for (i in li_before.indices){
                    ans= this.getList(li_before.take(i)+li_before.takeLast(li_before.size-1-i), li_after+li_before[i],tmp_ans)
                }
            }
            return ans
        }
        private fun getMap():MutableMap<List<T>, Int>{
            var ans= mutableMapOf<List<T>, Int>()
            this.sortedList.forEachIndexed { index, e -> ans[e]=index }
            return ans
        }
        private fun fact(n:Int): Int{
            return if (n==0) 1 else n*this.fact(n-1)
        }
    }
    var n= readLine()!!.toInt()
    var points= mutableListOf<List<Int>>()
    for (i in 0 until n){
        points.add(readLine()!!.split(" ").map { it.toInt() })
    }
    var p=Permutation((0 until n).toList())
    var ans=0.toDouble()
    for (i in p.sortedList){
        var sum:Double= (-1).toDouble()
        var tmp=-1
        for (j in i){
            if (sum==(-1).toDouble()){
                sum=0.toDouble()
            }else{
                sum+= sqrt(pow((points[j][0]-points[tmp][0]).toDouble(), 2.toDouble())+pow((points[j][1]-points[tmp][1]).toDouble(), 2.toDouble()))
            }
            tmp=j
        }
        ans+=sum
    }
    println(ans/p.size_li)
}

Measured memory_bytes: 74704