import Data.List

main = do
 getLine
 as <- map read . words <$> getLine
 putStrLn $ unwords $ map show (cl as)

cl as = [r1, r1+r2]
 where
  r1 = length $ filter (not.null) $ map (intersect as) lb
  r2 = length $ filter (>=3200) as

lb = [[1..399],[400..799],[800..1199],[1200..1599],[1600..1999],[2000..2399],[2400..2799],[2800..3199]]