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