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