def d(x, y, p)
  x.zip(y).sum{|a,b|(a-b).abs**p}**(1.0/p)
end

def c(x, y)
  x.zip(y).map{|a,b|(a-b).abs}.max
end

def pf(*a)
  puts "%.6f" % a
end

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

pf d(x,y,1)
pf d(x,y,2)
pf d(x,y,3)
pf c(x,y)

