import Control.Monad
import Control.Applicative
solve :: [[Double]] -> [Double]
solve [_,vecX,vecY] =
    [
        chebyshev 1.0 vecX vecY,
        chebyshev 2.0 vecX vecY,
        chebyshev 3.0 vecX vecY,
        maximum $ zipWith (\x y -> abs(x-y)) vecX vecY
    ] 
    where
    chebyshev :: Double -> [Double] -> [Double] -> Double
    chebyshev n vx vy =
        (sum $ zipWith (\x y -> abs(x-y)**n) vx vy) ** (1.0/n)

main =
    mapM_ (putStrLn . show) =<< solve . takeInputs . lines <$> getContents
    where
    takeInputs :: [String] -> [[Double]]
    takeInputs = take 3 . map (map read . words)