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