#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  string S;
  cin >> S;
  for (int i = 0; i < S.size(); i++) {
    if (i == (a + 1) && S.at(i) != '-') {
      cout << "No" << endl;
      break;
    } else if (S.at(i) == '-') {
      cout << "No" << endl;
      break;
    }
    if (i == S.size() - 1) {
      cout << "Yes" << endl;
    }
  }
}
