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