n = gets.to_i
x = gets.split.map(&:to_f)
y = gets.split.map(&:to_f)

(1..3).each do |p|
	d = 0.0
	n.times do |i|
		d += ((x[i] - y[i]).abs)**p
	end

	puts d**(1.0/p)
end

chebyshev = []
n.times do |i|
	chebyshev.push (x[i] - y[i]).abs
end

puts chebyshev.max