import Data.List
import Control.Monad

toFloat = fromRational . toRational

solveSub [_] = 0.0
solveSub (l1:l2:ss)  = l12 + solveSub (l2:ss)
                            where
                                x1 = l1!!0
                                y1 = l1!!1
                                x2 = l2!!0
                                y2 = l2!!1
                                l12 = sqrt $ toFloat ((x1-x2)^2 + (y1-y2)^2)

solve :: [[[Int]]] -> Float
solve [] = 0.0
solve (s:ss) = solveSub s + solve ss

main = do
    n <- readLn :: IO Int
    xyn <- replicateM n (map read . words <$> getLine) :: IO [[Int]]
    let perm_xyn = permutations xyn
    print $ (solve $ perm_xyn) / (toFloat (length $ perm_xyn))
