#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int A, B;
  string s;
  cin >> A >> B >> s;
  for (int i = 0; i < A + B + 1; i++) {
    if (i <= A - 1) {
      if (isalnum(s[i]) == EOF) {
        cout << "No" << endl;
        return 0;
      }
    } else if (i == A) {
      if (s[i] != '-') {
        cout << "No" << endl;
        return 0;
      }
    } else if (i > A) {
      if (isalnum(s[i]) == EOF) {
        cout << "No" << endl;
        return 0;
      }
    }
  }
  cout << "Yes" << endl;
  return 0;
}
