import Control.Applicative import Control.Monad import Data.List import Data.Maybe count x = length . filter (== x) solve a = (x, y) where n = length a s = sum a `quot` (n - 1) b = map (s -) a x = count 2 b y = count 4 b main = do _ <- getLine a <- map read . words <$> getLine :: IO [Int] let (x, y) = solve a putStrLn $ show x ++ " " ++ show y