gets
x = gets.split(" ").map(&:to_f)
y = gets.split(" ").map(&:to_f)
d = [x,y].transpose.map{|c| c.inject(:-).abs}
(1..3).each do |i|
  puts d.map{|c| c**(i)}.inject(:+)**(1.0/i).round(6)
end
puts d.max.round(6)