#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B;
  cin >> A >> B;
  string s;
  cin >> s;
  if (s.at(0) != '-' && s.at(A - 1) != '-' && s.at(A) == '-' &&
      s.at(A + 1) != '-' && s.at(B - A) != '-' && s.at(B) != '-') {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
