fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val ts: List<Town> = (1..n).map {
        val map = readLine()!!.split(" ").map { it.toInt() }
        Town(map[0], map[1])
    }

    var sum: Double = 0.0
    for (s in (0 until (ts.size - 1))) {
        for (e in (s until ts.size)) {
            val length: Double = length(ts[s], ts[e])
            sum += length
        }
    }

    println(sum * 2 / n)

}

fun length(a: Town, b: Town): Double {
    val x = (a.x - b.x)
    val y = (a.y - b.y)
    return Math.sqrt(x * x + y * y * 1.0)
}

data class Town(val x: Int, val y: Int)
