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