n = gets.to_i
x = gets.split(" ").map(&:to_f)[0,n]
y = gets.split(" ").map(&:to_f)[0,n]
4.times do |i|
  k = (i + 1).to_f
  puts ((k == 4.0) ? [x,y].transpose.map{|c| c.inject(:-).abs}.max : [x,y].transpose.map{|c| c.inject(:-).abs**(k)}.inject(:+)**(1/k)).round(6)
end