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