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