// Template from https://techracho.bpsinc.jp/jhonda/2019_08_05/78537

// input macro for competive-programming from https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        input_inner!{$s, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };

    ($iter:expr, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, bytes) => {
        read_value!($iter, String).into_bytes()
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    use std::io::Read;
    let mut s = String::new();
    std::io::stdin().read_to_string(&mut s).unwrap();

    println!("{}", solve(&s));
}

macro_rules! test {
    ($($exp_input:expr => $output:expr),* $(,)*) => {
        #[test]
        fn solve_test() {
            $(
                let start = std::time::Instant::now();
                let input = solve($exp_input);
                let end = start.elapsed();
                assert_eq!(input, $output, "{}.{:03}", end.as_secs(), end.subsec_millis());
                assert!(end.as_secs() <= 2, "expected_sec: {}sec, actual_sec: {}sec", 2, end.as_secs());
                assert!(end.as_secs() <= 1, "expected_sec: {}sec, actual_sec: {}sec", 1, end.as_secs());
                assert!(end.subsec_millis() <= 10, "expected_ms: {}ms, actual_ms: {}ms", 10, end.subsec_millis());
                assert!(end.subsec_millis() <= 2, "expected_ms: {}ms, actual_ms: {}ms", 2, end.subsec_millis());
            )*
        }
    };
}

test! {
r#"3
0 0
1 0
0 1"# => r#"2.2761423749"#,

r#"2
-879 981
-866 890"# => r#"91.9238815543"#,

r#"8
-406 10
512 859
494 362
-955 -475
128 553
-986 -885
763 77
449 310"# => r#"7641.9817824387"#,
}

fn sub_perm(rsl: &mut Vec<Vec<usize>>, perm: &mut Vec<usize>, used: &mut Vec<bool>, pos: usize, n: usize) {
    if pos == n {
        rsl.push(perm.clone());
        return;
    }
    for i in 0..n {
        if !used[i] {
            perm[pos] = i;
            used[i] = true;
            sub_perm(rsl, perm, used, pos + 1, n);
            used[i] = false;
        }
    }
}

// 再帰関数による全探索 (深さ優先探索)
fn permutation(n: usize) -> Vec<Vec<usize>> {
    let mut rsl = Vec::new();
    let mut perm = vec![0; n];
    let mut used = vec![false; n];
    sub_perm(&mut rsl, &mut perm, &mut used, 0, n);
    rsl
}

fn solve(src: &str) -> String {
    let mut src_iter = src.split_whitespace();
    input! {
        source = src_iter,
        n: usize,
        xy: [(isize, isize); n],
    }

    let mut ans = 0.0;

    let perm = permutation(n);

    for i in 0..perm.len() {
        for j in 0..perm[i].len() - 1 {
            ans += f64::sqrt(((xy[perm[i][j]].0 - xy[perm[i][j + 1]].0).pow(2) + (xy[perm[i][j]].1 - xy[perm[i][j + 1]].1).pow(2)) as f64);
        }
    }

    format!("{:.7}", (ans / perm.len() as f64))
}

Measured memory_bytes: 8444