import Data.List
import Control.Monad

solve :: [[Int]] -> Int -> Double
solve xss n = (sum $ map dist $ permutations xss) / (fromIntegral $ product [1..n])
    where
        dist :: [[Int]] -> Double
        dist ([_,_]:[]) = 0
        dist ([a,b]:[c,d]:xs) = x + dist ([c,d]:xs)
            where
                x :: Double
                x = sqrt . fromIntegral $ ((a-c)^2) + ((b-d)^2)


main = do
    n <- readLn :: IO Int
    xss <- replicateM n (map read . words <$> getLine) :: IO [[Int]]
    print $ solve xss n