import Data.List
import Text.Printf

solve :: [Double] -> [Double] -> [Double]
solve xs ys = p1 : p2 : p3 : p : []
    where
        ts = zip xs ys
        p1 = foldl (\a t -> a + abs (fst t - snd t)) 0 ts
        p2 = sqrt $ foldl (\a t -> a + abs (fst t - snd t) ** 2) 0 ts
        p3 = (foldl (\a t -> a + abs (fst t - snd t) ** 3) 0 ts) ** (1 / 3)
        p  = maximum $ map (\t -> abs (fst t - snd t)) ts

main :: IO ()
main = do
    _  <- getLine
    xs <- getLine
    ys <- getLine
    putStr $ unlines $ map (printf "%.6f") $ solve (map read $ words xs) (map read $ words ys)