import Data.List

main = do
  n <- getLine
  a <- map read . words <$> getLine
  putStrLn $ arrStr $ solve $ tr a

arrStr:: [Int] -> String
arrStr a = unwords $ map show a

solve:: [Int]  -> [Int]
solve a
  | not hasO = [ssl, ssl]
  | otherwise = [max ssl ol, min 7 (ssl + ol)]
  where
    ss = unique $ filter (/= 10) a
    o = filter (== 10) a
    ssl = length ss
    ol = length o
    hasO = ol /= 0

tr:: [Int] -> [Int]
tr a = map conv a

unique a = map head $ group $ sort a

conv a
  | a < 400 = 1
  | a < 800 = 2
  | a < 1200 = 3
  | a < 1600 = 4
  | a < 2000 = 5
  | a < 2400 = 6
  | a < 2800 = 7
  | otherwise = 10