#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int a, b;
  string s;
  cin >> a >> b;
  cin >> s;
  for (int i = 0; i < a + b; i++) {
    if (i = a) {
      if (s[i] != '-') {
        cout << "No" << endl;
        return 0;
      }
    } else {
      if (!'1' <= s[i] && '9' <= s[i]) {
        cout << "No" << endl;
        return 0;
      }
    }
  }
  cout << "Yes" << endl;
}
