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