import Control.Monad
import Data.List

solve :: [[Int]] -> [[Int]] -> [Double]
solve _ [] = []
solve xys (o:os) = res : solve xys os
  where res = sum $ s xys o

s :: [[Int]] -> [Int] -> [Double]
s _ [_] = []
s xys (o1:o2:os) = res : s xys (o2:os)
  where [x1, y1] = xys !! (o1 - 1)
        [x2, y2] = xys !! (o2 - 1)
        res = sqrt . fromIntegral $ (x1 - x2) ^ 2 + (y1 - y2) ^ 2

main :: IO ()
main = do
  n <- readLn
  xys <- replicateM n $ map read . words <$> getLine
  let p = permutations [1..n]
  let r = solve xys p
  print $ sum r / fromIntegral (length r)