open Str

let read_list f =
  split (regexp " +") (read_line ()) |> List.map f

let rate x =
  let y = x / 400 in
  if y > 8 then 8 else y

let part ar =
  let rec loop i c =
    if i = 8 then c
    else
      loop (i+1) ((if ar.(i) > 0 then 1 else 0) + c) in
  (loop 0 0, ar.(8))
  
let () =
  let n = read_int () in
  let xs = read_list int_of_string in
  let tbl = Array.make 9 0 in
  List.iter (fun x -> let r = rate x in tbl.(r) <- (tbl.(r) + 1)) xs;
  match part tbl with
    0, y -> print_endline @@ "1 " ^ (string_of_int y)
  | x, y -> print_endline @@ (string_of_int x) ^ " " ^ (string_of_int (x+y))
