#include <bits/stdc++.h>
using namespace std;

int main() {
  int A = 0, B = 0;
  string S = "";
  cin >> A >> B >> S;
  for(int i = 0; S[i] != ""; i++) {
    if(A + 1 != i && S[i] == "-") {
      cout << "No" << endl;
      return 0;
    }
    if(A + B != i) {
      cout << "No" << endl;
      return 0;
    }
    if(A + 1 != i && (S[i] <= 0 || S[i] >= 9)) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
