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