main = do
  n <- readLn::IO Int
  xs <- (return . map (read::String->Double) . words) =<< getLine
  ys <- (return . map (read::String->Double) . words) =<< getLine
  print $ d1 xs ys
  print $ d2 xs ys
  print $ d3 xs ys
  print $ d4 xs ys
  
d1 xs ys = sum $ map (\(x,y)-> abs (x-y)) $ zip xs ys
d2 xs ys = (sum $ map (\(x,y)-> ((**2) . abs) (x-y)) $ zip xs ys) ** (1/2)
d3 xs ys = (sum $ map (\(x,y)-> ((**3) . abs) (x-y)) $ zip xs ys) ** (1/3)
d4 xs ys = maximum $ map (\(x,y)-> abs (x-y)) $ zip xs ys
