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