let split_on_char =
    BatString.split_on_char

let calc a b s =
    match split_on_char '-' s with
    | [x; y] -> String.length x = a && String.length y = b
    | _ -> false

let main =
    let [a; b] = read_line () |> split_on_char ' ' |> List.map int_of_string in
    let s = read_line () in
    let v = (calc a b s) in
    print_endline (if v then "Yes" else "No")
