gets
xs = gets.split.map(&:to_f)
ys = gets.split.map(&:to_f)

1.upto(3) do |p|
  puts xs.zip(ys).map {|x| (x[0] - x[1]).abs ** p }.reduce(:+) ** (1/p.to_f)
end

puts xs.zip(ys).map {|x| (x[0] - x[1]).abs }.max