#include <bits/stdc++.h>
int main() {
  int a, b;
  std::string input;
  std::cin >> a >> b >> input;
  if (input.size() != a + b + 1) {
    std::cout << "No";
    return 0;
  }
  if (input[a + 1] != '-') {
    std::cout << "No";
    return 0;
  } else {
    input[a + 1] = '0';
  }
  for (auto block : input) {
    if (block == '-') {
      std::cout << "No";
      return 0;
    }
  }
  std::cout << "Yes";
}
