import Control.Applicative( (<$>))
import Data.List( nub, elem)

main = do
    _n <- getLine
    as_ <- map (read::String->Int) . words <$> getLine
    let
	color a = let
		    colortype = a`quot`400
		in
		    if 8 <= colortype
			then Nothing
			else Just colortype

	preColors =  color <$> as_
	monsters = length . filter (Nothing==) $ preColors
	colors = nub preColors

	(mn,mx) = let
		    numColors = length colors
	    in
		if Nothing `elem` colors
		then (numColors - 1, min 8 (numColors-1+monsters))
		else (numColors    , numColors)

    putStr (show mn ++ " ") >> putStr (show mx)