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

xy = [x, y].transpose

dist = 0
xy.each do | i, j |
  dist += ( i - j ).abs
end
puts dist

(2..n).each do | i |
  dist = 0
  xy.each do | j, k |
    dist += ( i - j ).abs ** 1/i
  end
  puts dist ** 1/i
end