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