(input => {
  let arr = input.split('\n');
  let [A, B] = arr[0].split(' ').map(Number);
  let S = arr[1];
  let r = new RegExp(`^\\d{${A}}-\\d{${B}}$`);
  console.log(r)
  console.log(r.test(S) ? 'Yes' : 'No');
})(require("fs").readFileSync("/dev/stdin", "utf8"));