#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, b, n;
  cin >> x >> b;
  n = x + b + 1;
  char a[n];
  cin >> a;
  for (int i = 0; i < n; i++) {
    if (i != x) {
      if (a[i] == '0' || a[i] == '1' || a[i] == '2' || a[i] == '3' ||
          a[i] == '4' || a[i] == '5' || a[i] == '6' || a[i] == '7' ||
          a[i] == '8' || a[i] == '9') {
        continue;
      } else {
        cout << "NO";
        return 0;
      }
    }
  }
  if (a[x] == '-')
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
