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