let () =
  let a,b = Scanf.scanf "%d %d " (fun a b -> a,b) in
  let s = Scanf.scanf "%s " (fun a -> a) in

  let fl = String.sub s 0 a in
  let hl = String.sub s a 1 in
  let ll = String.sub s (a+1) ((a+b+1)-(a+1)) in

  let int_of_string_opt s =
    try Some (int_of_string s)
    with Failure _ -> None
  in
  let f_fl = match int_of_string_opt fl with
      Some x -> true 
    | None -> false
  in
  let f_ll = match int_of_string_opt ll with
      Some x -> true 
    | None -> false
  in

  Printf.printf "%s\n" (if f_fl && f_ll && hl = "-" then "Yes" else "No")
  
