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