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