#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  cin.sync_with_stdio(0);
  int A, B;
  string S;
  cin >> A >> B >> S;
  int idx = S.find('-');
  if (idx == string::npos) {
    cout << "No";
  } else {
    cout << (idx == A && (int)S.size() - idx == B + 1 ? "Yes" : "No");
  }
}
