#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B;
  cin >> A >> B;
  string S;
  cin >> S;
  if ((A + B + 1) != S.size()) {
    cout << "No";
    return 0;
  }
  int pos = S.find("-");
  if (pos == string::npos) {
    cout << "No";
    return 0;
  }
  if (A == pos) {
    cout << "Yes";
  } else {
    cout << "No";
  }
  return 0;
}
