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