(*
ocamlfind ocamlopt -package batteries -linkpkg main.ml -o a.out
*)
open Batteries

let i, j = ref 0, ref 0
let f b = 
        if b then
                (* side effect *)
                (
                        incr i;
                        Printf.printf "Yes\n"
                )
        else
                Printf.printf "No\n"

let () =
        Scanf.sscanf (read_line ()) "%d %d %d" (
                fun _ a b -> 
                        let str = read_line () in
                                String.iter (function 
                                        'a' -> f (!i < a + b)
                                        | 'b' -> 
                                                (* side effect *)
                                                (
                                                        incr j;
                                                        f (!i < a + b && !j <= b)
                                                ) 
                                        | _ -> 
                                                f false
                                ) str
        )
