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