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