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