#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int A, B;
  string post_number;
  cin >> A >> B;
  cin >> post_number;
  bool ok = false;
  for (int i = 0; i < post_number.length(); i++) {
    if (i != A && post_number[i] == '-') {
      cout << "No" << endl;
      ok = false;
      break;
    } else if (i == A && post_number[i] == '-') {
      ok = true;
    }
  }
  if (ok)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
