#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  if (a <= 5 && b <= 5) {
    int ns = s.size();
    std::size_t found = s.find("-");
    if (found != std::string::npos) {
      int na = found;
      int nb = ns - found - 1;
      for (int i = 0; i < na; ++i) {
        if (s[i] < '0' || s[i] > '9') {
          cout << "No";
          return 0;
        }
      }
      for (int i = na + 1; i < ns; ++i) {
        if (s[i] < '0' || s[i] > '9') {
          cout << "No";
          return 0;
        }
      }
      cout << "Yes";
    } else {
      cout << "No";
    }
  } else {
    cout << "No";
  }
  return 0;
}
