'use strict';

function main(input) {
  let AB = input.split("\n")[0].split(' ').map(x => Number(x));
  let s = input.split("\n")[1];

  if(s.length != AB[0] + AB[1] + 1 || s[AB[0]] != "-") {
  	console.log("No");
    return;
  }
  if(s.slice(0,AB[0]).match(/^[0-9]+$/) &&
	     s.slice(AB[0]+1).match(/^[0-9]+$/)){
    console.log("Yes");
    return;
  }
  console.log("No");

}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
