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