let n = Scanf.scanf "%d" (fun x -> x)
let xs = Array.init n (fun _ -> Scanf.scanf " %d" (fun x -> x / 400)) |> Array.to_list
let () =
  let colors = xs |> List.filter ((>) 8) |> List.sort_uniq (-) |> List.length in
  let num_reds = xs |> List.filter ((<=) 8) |> List.length in
  let min_colors, max_colors = max 1 colors, min 7 (colors + num_reds) in
  Printf.printf "%d %d\n" min_colors max_colors