#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int A, B;
  cin >> A >> B;
  string S;
  cin >> S;
  int len = S.length();
  if (len != A + B + 1) {
    cout << "No" << '\n';
    return 0;
  }
  for (int i = 0; i < len; ++i) {
    if (i % 3 == 0 && i != 0 && i != 6 && S[i] != '-') {
      cout << "No" << '\n';
      return 0;
    } else if ((S[i] < '0' || S[i] > '9') && i != 3) {
      cout << "No" << '\n';
      return 0;
    }
  }
  cout << "Yes" << '\n';
  return 0;
}
