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