#include <bits/stdc++.h>
using namespace std;
template <typename List>
void split(const std::string& s, const std::string& delim, List& result) {
  result.clear();
  string::size_type pos = 0;
  while (pos != string::npos) {
    string::size_type p = s.find(delim, pos);
    if (p == string::npos) {
      result.push_back(s.substr(pos));
      break;
    } else {
      result.push_back(s.substr(pos, p - pos));
    }
    pos = p + delim.size();
  }
}
int main() {
  int A, B;
  string S;
  vector<string> result;
  cin >> A >> B;
  cin >> S;
  split(S, "-", result);
  if (result[0].size() == A && result[2].size() == B) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
