#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B;
  string S;
  cin >> A >> B;
  cin >> S;
  string ans = "Yes";
  for (int i = 0; i < A; i++) {
    if (S.at(i) == '-') {
      ans = "No";
    }
  }
  if (S.at(A + 1) != '-') {
    ans = "No";
  }
  for (int i = A + 2; i < A + B + 1; i++) {
    if (S.at(i) == '-') {
      ans = "No";
    }
  }
  cout << ans << endl;
}
