module Main where

import Data.Functor
import Numeric

main :: IO ()
main =  do
  { [n] <- getInts
  ; xs  <- getDoubles
  ; ys  <- getDoubles
  ; let zs = zipWith ((abs .) . subtract) xs ys
  ; putStr $ unlines $ map (flip (showFFloat Nothing) "") (map (flip minkovsky zs) [1,2,3] ++ [maximum zs])
  }

minkovsky :: Double -> [Double] -> Double
minkovsky p = (** recip p) . sum . map (** p)

done :: IO ()
done = return ()

getInts :: IO [Int]
getInts = map read . words <$> getLine

getDoubles :: IO [Double]
getDoubles = map read . words <$> getLine