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