n = gets.chomp.to_i
x = []
y = []
n.times do
    line = gets.chomp.split.map(&:to_i)
    x << line.shift
    y << line
end

result = []
(0...n).each do |i|
    (0...n).each do |j|
        result << (x[i] -  x[j]).abs**(1/2.0) + (y[i] - y[j]).abs**(1/2.0)
    end
end

puts result.inject(&:+) / n
