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