'use strict';

function main(input) {
  input = input.split("\n")
  const post = input[0].split(' ');

  const A = input[1].slice(0,Number(post[0]));
  const char = input[1].slice(Number(post[0]), Number(post[0])+1);
  const B = input[1].slice(Number(post[0])+1);

  if(1<=post[0] && post[0]<=5 && 1<=post[1] && post[1]<=5 && A.length == post[0] && A != "-" && char == "-" 
	     && B.length == post[1] && B != "-"){
  	console.log("Yes");
  }else{
  	console.log("No");
  }
  

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