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