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

main = do
    _n <- getLine
    as_ <- map (read::String->Int) . words <$> getLine
    let
	color a = a`quot`400

	preColors =  color <$> as_
	(colors,monsters) = span (<8) $ sort preColors
	colorMin = nub colors
	freeColors = length monsters

	(mn,mx) = let
		    numColors = length colorMin
	    in
		if [] /= filter (8<=) preColors
		then (numColors,  min 8 (numColors+freeColors))
		else (numColors,    numColors)

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