function Main (input) {
  input = input.split("\n");
  input[0] = input[0].split(" ");
  var A = input[0][0];
  var B = input[0][1];
  var S = input[1];
  var ans = "No";
  if (S.split("")[A] == "-" && S.split("-")[0].length == A && S.split("-")[1].length == B) {
    ans = "Yes";
  }
  console.log(ans);
}

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