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