#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B;
  string S;
  cin >> A >> B >> S;
  bool flag = true;
  if (S[A] == '-' && S[S.length() - 1 - B == '-']) {
    for (int i = (0); i < (S.length()); ++i) {
      if (S[i] == '-') {
        if (i != A) {
          flag = false;
          cout << "No";
        }
      }
    }
    if (flag == true) {
      cout << "Yes";
    }
  } else {
    cout << "No";
  }
}
