readDouble x = read x :: Double

mincowskiSub p 0 xs ys = 0
mincowskiSub p n (x:xs) (y:ys) = (abs (x - y))^p + mincowskiSub p (n - 1) xs ys
mincowski p n xs ys = (mincowskiSub p n xs ys) ** (1 / (fromIntegral p :: Double))

mincowskiMax xs ys = maximum $ zipWith (\x y -> abs (x - y)) xs ys

itp20d = do
  n <- readLn
  x <- return . map readDouble . words =<< getLine
  y <- return . map readDouble . words =<< getLine
  putStrLn $ printf "%.06f" $ mincowski 1 n x y
  putStrLn $ printf "%.06f" $ mincowski 2 n x y
  putStrLn $ printf "%.06f" $ mincowski 3 n x y
  putStrLn $ printf "%.06f" $ mincowskiMax x y