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