module Main where
import Control.Monad
import Control.Applicative
import Data.Maybe
import Data.List
import qualified Text.Printf
import qualified Data.ByteString.Char8 as BC
import qualified Data.ByteString as BC

import qualified Data.Set as Set

------------------------------------------

main :: IO ()
main = do
  n <- readInt
  colors <- map toColor <$> readInts
  let numAny = length $ filter (== Any) colors
      cs = Set.size $ foldl' (flip Set.insert) Set.empty colors
      d = if numAny > 0 then 1 else 0
  putStrLn $ show (cs - d) ++ " " ++ show (min (cs + max (numAny-1) 0) 8)
  


data Color = Gray | Brown | Green | Cyan | Blue | Yellow | Orange | Red | Any
  deriving (Enum, Eq, Ord, Show)

toColor :: Int -> Color
toColor rate
  | rate < 400 = Gray
  | rate < 800 = Brown
  | rate < 1600 = Cyan
  | rate < 2000 = Blue
  | rate < 2400 = Yellow
  | rate < 2800 = Orange
  | rate < 3200 = Red
  | otherwise = Any

------------------------------------------



{- Int input -}

parseInt :: BC.ByteString -> Int
parseInt = fst . fromJust . BC.readInt

parseInts :: BC.ByteString -> [Int]
parseInts = map parseInt <$> BC.words

readInt :: IO Int
readInt = parseInt <$> BC.getLine

readInts :: IO [Int]
readInts = parseInts <$> BC.getLine

{- Double Formatting -}

doubleFmt :: Double -> String
doubleFmt = Text.Printf.printf "%.12f"
