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