#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  string s;
  string test1, test2;
  cin >> a >> b;
  cin >> s;
  if (s.length() != a + b + 1) {
    cout << "No" << endl;
    return 0;
  }
  size_t index = s.find('-');
  if (index == string::npos) {
    cout << "No" << endl;
    return 0;
  }
  if (index != a) {
    cout << "No" << endl;
    return 0;
  }
  test1 = s.substr(0, index);
  test2 = s.substr(index, a + b + 1);
  for (int i = 0; i < a; i++) {
    if (test1[i] == '-') {
      cout << "No" << endl;
      return 0;
    }
  }
  for (int i = 0; i < b; i++) {
    if (test2[i] == '-') {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
