
gets
a = gets.split(" ").map(&:to_f)
b = gets.split(" ").map(&:to_f)

c = []
a.size.times do |i|
    c.push((a[i] - b[i]).abs)
end

print c.map{|a| a**1}.sum**(1/1.0), "\n"
print c.map{|a| a**2}.sum**(1/2.0), "\n"
print c.map{|a| a**3}.sum**(1/3.0), "\n"
print c.max, "\n"

