import Data.List (nub, sort)

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

-- |
--
-- >>> solve 5 [1100,1900,2800,3200,3200]
-- "3 5"
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 as_lower
