'use strict'

function main(s) {
  s = s.split('\n');
  
  const a = Number(s[0].split(' ')[0]);
  const b = Number(s[0].split(' ')[1]);
  const zip = s[1].split('-');
  const ans = zip.length === 2 && zip[0].length === a && zip[1].length === b;

  console.log(ans ? 'Yes' : 'No');
}

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