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