
open Scanf
open Printf

let flip f x y = f y x

let rec range a b = if a >= b then [] else a :: range (a+1) b

let read_int () = scanf " %d" (fun x -> x)
let rec read_ints n = if n = 0 then [] else let i = read_int () in i :: read_ints (n-1)

let rec for_iter a b f = if a >= b then [] else let x = f a in x :: for_iter (a+1) b f

let rec for_all_iter a b f = if a >= b then true else f a && for_all_iter (a+1) b f

let array_of_string str = Array.init (String.length str) (fun x -> str.[x])

let () =
  let a = read_int () in let b = read_int () in
  let s = read_line () in
  let check1 = for_all_iter 0 a (fun i -> '0' <= s.[i] && s.[i] <= '9') in
  let check2 = s.[a] = '-' in
  let check3 = for_all_iter (a+1) (a+b+1) (fun i -> '0' <= s.[i] && s.[i] <= '9') in
  printf "%s\n" (if check1 && check2 && check3 then "Yes" else "No")
