import Control.Applicative
import Control.Monad
import Numeric

lpnorm p x = ((sum.map (\ a -> abs(a) ** p)) x) ** (1/p)
maxnorm x = foldr max 0 x

main = do
    _ <- getLine
    x <- (map read.words) <$> getLine ::IO[Double]
    y <- (map read.words) <$> getLine ::IO[Double]
    let z = zipWith(-) x y
    putStrLn $ show ( lpnorm 1 z)
    putStrLn $ show ( lpnorm 2 z)
    putStrLn $ show ( lpnorm 3 z)
    putStrLn $ show ( maxnorm z)