'use strict';

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

  let reg = "^[0-9]{"+AB[0]+"}-[0-9]{"+AB[1]+"}$";
  if(s.match(reg)){
  	console.log("Yes");
  }else{
  	console.log("No");
  }

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