#include <bits/stdc++.h>
using namespace std;
int main() {
  int postal_count[2];
  for (auto i = 0; 2 > i; ++i) {
    cin >> postal_count[i];
  }
  string postal_code;
  cin >> postal_code;
  auto pos = postal_code.find("-");
  if (pos != string::npos) {
    if (postal_count[0] == (int)pos &&
        (postal_code.length() - (int)pos - 1) == postal_count[1]) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  } else {
    cout << "No" << endl;
  }
  return 0;
}
