module IntSet = Set.Make (struct type t = int let compare = compare end)

let () =
  let n = Scanf.scanf "%d\n" (fun n -> n) in
  let as_ = Array.init n (fun _ -> Scanf.scanf "%d " (fun a -> a)) in
  Array.map (fun a -> if a < 3200 then Some (a / 400) else None) as_
  |> Array.fold_left (fun (s, n) -> function
      | None -> (s, n + 1)
      | Some a -> (IntSet.add a s, n)) (IntSet.empty, 0)
  |> (fun (s, n) -> (IntSet.cardinal s, min 8 (IntSet.cardinal s + n)))
  |> (fun (max, min) -> Printf.printf "%d %d\n" max min)