import Control.Applicative main = do n <- readLn as <- map read . words <$> getLine let s = sum as `div` (n-1) (x, y) = ((4*n-s) `div` 2, (s-2*n) `div` 2) in putStrLn $ unwords . map show $ [x, y]