#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  string s;
  cin >> a >> b >> s;
  if (s.at(a) != '-') {
    cout << "No" << endl;
    return 0;
  }
  s.at(a) = '0';
  int i;
  for (i = 0; i < a + b + 1; i++) {
    if ((0 <= s.at(i) && s.at(i) <= 9)) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
