step :: [(Int, Int)] -> Double -> [Int] -> Double
step xys acc as = acc + res
  where
    res = loop as
    loop [_] = 0.0
    loop (a:b:as) = s + loop (b:as)
      where
        (ax,ay) = xys !! (a-1)
        (bx,by) = xys !! (b-1)
        s = sqrt $ fromIntegral ((ax-bx)^2 + (ay-by)^2)

main = do
  n <- readLn :: IO Int
  xys <- replicateM n $ do
    [x,y] <- map read . words <$> getLine :: IO [Int]
    return (x, y)
  
  let 
      ps = permutations [1..n] 
      a = foldl' (step xys) 0.0 ps
      b = (fromIntegral $ length ps)

  print $ a / b