n = gets.to_i
cities = Array.new
n.times do
  cities << gets.split.map(&:to_i)
end
sum = 0.0
count = 0
cities.combination(2).each do |a, b|
  sum += Math.sqrt((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2)
  count += 1
end
average = sum / count
puts average * (n - 1)
