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