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