n = gets.chomp.to_i
xy = [ gets.chomp.split(" ").map(&:to_f), gets.chomp.split(" ").map(&:to_f) ].transpose
maxval = 0

(1..3).each do | p |
  dist = 0
  xy.each do | x, y |
    maxval = [ maxval, ( x - y ).abs ].max
    dist += ( x - y ).abs ** p
  end
  puts dist ** ( 1.0 / p )
end
puts maxval