#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, i, size;
  int count = 0;
  std::string S;
  cin >> A >> B >> S;
  if (S[A] == '-') {
    size = S.size();
    for (i = 0; i <= size; i++) {
      if (S[i] == '-') {
        count++;
      }
    }
    if (size == A + B + 1 && count <= 0) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  } else {
    cout << "No" << endl;
  }
}
