let nats n =
  let rec loop i e =
    if i = 0 then 0 :: e
    else loop (i - 1) (i :: e) in
  loop n []


let inp_matrix : 'a array -> int -> int -> unit = fun a m n ->
  for i = 0 to m - 1 do
    for j = 0 to n - 1 do
      a.(i).(j) <- Scanf.scanf " %d" (fun x -> x)
    done
  done


let ins_all_positions x l =  
  let rec aux prev acc = function
    | [] -> (prev @ [x]) :: acc |> List.rev
    | hd::tl as l -> aux (prev @ [hd]) ((prev @ [x] @ l) :: acc) tl
  in
  aux [] [] l

let rec permutations = function  
  | [] -> []
  | x::[] -> [[x]] (* we must specify this edge case *)
  | x::xs -> List.fold_left (fun acc p -> acc @ ins_all_positions x p ) [] (permutations xs)

let rec pairs : 'a list -> ('a * 'a) list = function
    [] -> []
  | x :: xs -> List.map (fun y -> (x, y)) xs @ (pairs xs)


let () =
  let n = Scanf.sscanf (input_line stdin) "%d" (fun a -> a) in
  let a = Array.make_matrix n 2 0 in
  let () = inp_matrix a n 2 in
  let ps = pairs (nats (n - 1)) in
  let lens =
    List.map (fun (p1, p2) ->
        sqrt (float_of_int
                ((a.(p1).(0) - a.(p2).(0))
                 * (a.(p1).(0) - a.(p2).(0))
                 + (a.(p1).(1) - a.(p2).(1))
                   * (a.(p1).(1) - a.(p2).(1))))  
      ) ps in
  let ans = 2. *. (List.fold_left (fun sum len -> len +. sum) 0.0 lens)
            /. (float_of_int n)
  in
  print_float ans;
  print_newline ()
