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.fold_left (fun (s, n) a ->
    if a < 3200 then (IntSet.add (a / 400) s, n)
    else (s, n + 1)) (IntSet.empty, 0) as_
  |> (fun (s, n) -> (max 1 (IntSet.cardinal s), min 8 (IntSet.cardinal s + n)))
  |> (fun (max, min) -> Printf.printf "%d %d\n" max min)
