Scanf.scanf "%d %d" (fun h w ->
    let hist = Array.make 26 0 in
    for i = 1 to h do
        Scanf.scanf " %s" (fun s ->
            String.iter (fun c ->
                let q = int_of_char c - 97 in
                hist.(q) <- hist.(q) + 1
            ) s
        )
    done;
    let e4, e2, e1 =
        Array.fold_left (fun (e4, e2, e1) v ->
            if v mod 4 = 0 then (e4 + 1, e2, e1) else
            if v mod 2 = 0 then (e4, e2 + 1, e1) else
                                (e4, e2, e1 + 1)
        ) (0, 0, 0) hist
    in
    let mode = (h mod 2) * 2 + (w mod 2) in
    print_endline @@ if mode = 0 then (if e2 + e1 > 0 then "No" else "Yes") else
                     if mode = 3 then (if e1 = 1 && e2 <= (w + h - 2) / 2 then "Yes" else "No") else
                     if mode = 2 then (if e1 = 0 && e2 <= w / 2 then "Yes" else "No") else
                                      (if e1 = 0 && e2 <= h / 2 then "Yes" else "No")
)