n = gets.chomp.to_i
towns = (0...n).map { gets.chomp.split(' ').map(&:to_i) }

sum = 0
p_cnt = towns.permutation.to_a.count
towns.permutation do |permutation|
  permutation.each_cons(2) do |t1, t2|
    sum += Math.sqrt((t1[0] - t2[0]) ** 2 + (t1[1] - t2[1]) ** 2 )
  end
end

puts sum / p_cnt