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