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