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