#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B;
  cin >> A >> B;
  string s;
  cin >> s;
  bool check = true;
  if (s.size() != A + B + 1) {
    check = false;
  }
  if (s[A] != '_') {
    check = false;
  }
  for (int i = 0; i < s.size(); i++) {
    if (i != A) {
      if (s[i] - '0' < 0 || s[i] - '0' > 9) {
        check = false;
      }
    }
  }
  if (check) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
