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

xy = x.zip(y)

(1..3).each do |d|
  puts xy.inject(0){|total, v| total += (v[0] - v[1]).abs ** d } ** (1/d.to_f)
end

puts xy.map{|v| (v[0] - v[1]).abs }.max