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