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