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