import           Control.Monad
import           Data.List
import           Data.Maybe
import qualified Data.ByteString.Char8 as B

type Coord = (Double, Double)

main :: IO ()
main = solve <$> getParams >>= print

getParams :: IO [Coord]
getParams = readLn >>= flip replicateM getCoord

getCoord :: IO Coord
getCoord = do
  [x, y] <- map readInt . B.words <$> B.getLine
  return (fromIntegral x, fromIntegral y)

readInt :: B.ByteString -> Int
readInt = fst . fromJust . B.readInt

solve :: [Coord] -> Double
solve = average . map pathLength . permutations

pathLength :: [Coord] -> Double
pathLength xs = sum . zipWith distance xs $ tail xs

distance :: Coord -> Coord -> Double
distance (xi, yi) (xj, yj) = sqrt $ (xi - xj)^2 + (yi - yj)^2

average :: Fractional a => [a] -> a
average xs = sum xs / genericLength xs
