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