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