main = do 
 n <- readLn
 as <-map read . words <$> getLine
 let c = (f as 1 399)+(f as 400 799)+(f as 800 1199)+(f as 1200 1599)+(f as 1600 1999)+(f as 2000 2399)+(f as 2400 2799)+(f as 2800 3199)
 let d = length $ filter (>=3200) as
 let maxc = max 8 (c + d)
 let minc = min 1 c
 putStr $ show(minc) ++ " " ++ show (maxc)
f as m n
    |Null $ filter (\x -> (m<=x && x <=n)) as = 0
    |otherwise =1
