#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B;
  cin >> A >> B;
  char S;
  for (int i = 0; i < A + B + 1; i++) {
    cin >> S;
    if (i != A) {
      if (S < 49 || S > 57) {
        cout << "No" << endl;
        return 0;
      }
    } else if (i == A) {
      if (S != '-') {
        cout << "No" << endl;
        return 0;
      }
    }
  }
  cout << "Yes" << endl;
}
