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