#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  char s[a + b + 2];
  cin >> s;
  for (int i = 0; i < strlen(s); i++) {
    if (i == a) {
      if (s[i] != '-') {
        cout << "NO" << endl;
        return 0;
      } else
        continue;
    } else {
      if (s[i] >= '0' && s[i] <= '9') {
        continue;
      } else {
        cout << "NO" << endl;
        return 0;
      }
    }
  }
  cout << "YES";
  return 0;
}
