towns = (1..gets.to_i).to_a
array = []
n.times do
x,y = gets.split(" ").map {|v| v.to_i}
array << [x,y]
d,r = 0,0
c_towns = towns.clone
while c_towns.size > 0
  a = c_towns.pop
  for b in 0...c_towns.size
    d += distance(towns[a], towns[b])
    r += 1
  end
end
puts d / r
def distance(place1, place2)
  d = (place1[0] - place2[0]) ** 2 + (place1[1] - place2[1]) ** 2
  return Math.sqrt(d)
end