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

total_dist = 0

[*1..N].permutation(N) do |order|
  dist = 0
  list = order.map { |n| towns[n - 1] }
  cy, cx = list[0]

  list[1..-1].each do |y, x|
    dist += Math.sqrt((cy - y) ** 2 + (cx - x) ** 2)
    cy = y
    cx = x
  end

  total_dist += dist
end

puts total_dist / (1..N).inject(:*).to_f
