#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);
  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;
}
