#include <bits/stdc++.h>
using namespace std;
int main(void) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  bool f = true;
  if ((int)s.size() == a + b + 1) {
    for (int i = 0; i < (int)s.size(); ++i) {
      if (i == a)
        f = (s[i] != '-') ? false : true;
      else if ((s[i] < '0') || (s[i] > '9'))
        f = false;
    }
  } else
    f = false;
  if (f)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
