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