n = gets.to_i
towns = n.times.map { gets.split.map(&:to_i) }
towns

s = towns.permutation(n).size
sum = towns.permutation(n).map{|ordered_towns|
  ordered_towns.each_cons(2).map{|a, b|
    Math.sqrt((a[0] - b[0])**2 + (a[1] - b[1])**2)
  }.inject(:+)
}.inject(:+)

puts sum/s