let () = Scanf.scanf "%d\n" @@ fun n ->
  let as_, bs =
    List.partition (( <= ) 3200) @@
    Array.to_list @@
    Array.init n @@ fun _ ->
      Scanf.scanf "%d " @@ fun a -> a in
  let x = List.length as_ in
  let y =
    List.length @@
    List.sort_uniq compare @@
    List.map (fun a -> a / 400) bs in
  Printf.printf "%d %d\n" (max (min 1 x) y) (x + y)