import Data.List (nub, sort)

main :: IO ()
main = do
    n <- readLn
    as <- (map read . words) <$> getLine
    putStrLn $ solve n as

-- |
--
-- >>> solve 4 [2100,2500,2700,2700]
-- "2 2"
--
-- >>> solve 5 [1100,1900,2800,3200,3200]
-- "3 5"
--
-- >>> solve 20 [800,810,820,830,840,850,860,870,880,890,900,910,920,930,940,950,960,970,980,990]
-- "1 1"
solve :: Int -> [Int] -> String
solve n as = show k_min ++ " " ++  show (k_min + n_upper)
  where
    as_lower = takeWhile (< 3200) $ sort as
    n_lower = length as_lower
    n_upper = n - n_lower
    k_min = length . nub . map (`div` 400) $ as_lower
