let () =
  let r = Array.make 4 0 and
      l = Array.make 4 0 and
      f n a =
        if n >= 1.1 then a.(0) <- a.(0) + 1
        else if n < 1.1 && n >= 0.6 then a.(1) <- a.(1) + 1
        else if n < 0.6 && n >= 0.2 then a.(2) <- a.(2) + 1
        else if n < 0.2 then a.(3) <- a.(3) + 1
  in
  let rec read () =
    try let line = read_line ()
                   |> Str.split (Str.regexp " ")
                   |> List.map float_of_string
                   |> Array.of_list
        in
        let (right,left) = (line.(0),line.(1))
        in
        f right r;
        f left l;
        read ()
    with
      End_of_file ->
      for i = 0 to 3 do
        Printf.printf "%d %d\n" r.(i) l.(i)
      done
  in
  read ()
;;