#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  bool ok = true;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] < '0' || s[i] > '9') {
      ok = false;
      if (i == a && s[i] == '-') ok = true;
    }
  }
  if (ok && s[a] == '-')
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
