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