#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B;
  cin >> A >> B;
  string str;
  cin >> str;
  if (str.size() != A + B + 1) {
    cout << "No" << endl;
    return 0;
  }
  for (int i = 0; i < str.size(); i++) {
    if (i == A) {
      if (str[i] != '-') {
        cout << "No" << endl;
        return 0;
      }
    }
    if (str[i] <= '0' || str[i] >= '9') {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
}
