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