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