#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int a, b, i;
  cin >> a >> b;
  cin >> s;
  if (a + b + 1 != s.size()) {
    cout << "No" << endl;
    return 0;
  }
  for (i = 0; i < s.size(); i++) {
    {
      if (i != a) {
        if (!isdigit(s[i])) {
          cout << "No" << endl;
          return 0;
        }
      }
    }
    if (s[a + 1] != '-') {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
