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