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