#load "str.cma";;

open List

let get_int () = int_of_string (read_line ());;

let rec to_int sep =
    match sep with 
    | [] -> []
    | a :: b -> 
            (int_of_string a) :: (to_int b);;

let rec to_color rates =
    match rates with
    | [] -> []
    | fst :: rst -> (fst / 400) :: (to_color rst)

let rec print_int_arr arr =
    match arr with
    | [] -> ()
    | fst :: rst -> Printf.printf "%d\n" fst; print_int_arr rst;;

let get_int_arr () = 
    to_int (Str.split (Str.regexp " ") (read_line ()));;

let main =
    let _ = read_line () in
    let a = to_color (get_int_arr ()) in
    let const = List.length (List.sort_uniq (fun x y -> x - y) (List.filter (fun b -> b < 8) a)) in
    let change = List.length (List.filter (fun b -> b > 7) a) in
    
    Printf.printf "%d " const;
    Printf.printf "%d\n" (const + change);
