n = gets.to_i

x = []
y = []
ans = []
ave = 0

n.times do |ni|
	x[ni],y[ni] = gets.split(' ').map(&:to_i)
end

x.each do |xi|
	y.each do |yi|
		ans << (x[xi]^2) - (y[yi]^2)	
	end
end

ave = ans.inject(:+) / n

puts ave

=begin
require 'complex'

n = gets.to_i
x = []
y = []
n.times{|i| x[i],y[i] = gets.chomp.split(' ').map(&:to_i)}

n-1.times do |j|
	sum << Math.sqrt((x[j] - x[j+1])**2)
	
end
=end

=begin
n-1.times do |j|
	sum << Math.sqrt((x[j] - x[j+1])**2)
	sum << Math.sqrt((y[j] - y[j+1])**2)
	sum << Math.sqrt((x[j] - x[j+2])**2)
	sum << Math.sqrt((y[j] - y[j+2])**2)
end

puts sum.inject(:+) / n
=end