"use strict";

function main(input) {
  input = input.split(/\n|\s/);
  const a = ~~input[0];
  const b = ~~input[1];
  const s = input[2].split("-");

  let ans = "No";
  if (s[0].length == a && s[1].length === b && ~~s[0] > 0 && ~~s[1] > 0) {
    ans = "Yes";
  }
  console.log(ans);
}

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