function Main(input){
  input = input.split("\n");
  var mem = input[0].split(" ").map(Number);

  var p;
  eval("p = /[0-9]{"+mem[0]+"}-[0-9]{"+mem[1]+"}$/g");
  var n = input[1].match(p);
  console.log(n?"Yes":"No")

}Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());