import Control.Applicative

minkowski n x y = (sum $ map ((**n) . abs) $ zipWith (-) x y) ** (1/n)
chebyshev x y = maximum $ map abs $ zipWith (-) x y

main = do
	_ <- getLine
	x <- map read . words <$> getLine
	y <- map read . words <$> getLine
	print $ minkowski 1 x y
	print $ minkowski 2 x y
	print $ minkowski 3 x y
	print $ chebyshev x y