#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B;
  cin >> A >> B;
  string S;
  cin >> S;
  string str1, str2;
  for (int i = 0; i < S.size(); i++) {
    if (S[i] == '-') {
      str2 = S.substr(i + 1, S.size());
      break;
    }
    str1 += S[i];
  }
  if (A == str1.size() && B == str2.size()) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
