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