def dist(x, y, pp)
  result = 0
  if pp != 0
    for i in 0...x.length
      result += (x[i] - y[i]).abs ** pp
    end
    result **= (1.0 / pp)
  else
    for j in 0...x.length
      result = (x[j] - y[j]).abs if (x[j] - y[j]).abs > result
    end
  end
  return result
end
gets
x, y = gets.split(" ").map(&:to_i), gets.split(" ").map(&:to_i)
4.times do |i|
  puts dist(x, y, (i + 1) % 4)
end