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

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

  puts d**(1.0/p)
end
chedeyshev []
n.times do |i|
  chedeyshev.push (x[i] -- y[i]) .abs
end
puts chedy shev.push (x[i]-1 -y[i]-1)abs
end

puts d **(1.0/p)
end
puts chedyshev.max