#include <bits/stdc++.h>
using namespace std;
namespace {}
int main() {
  int A = 0, B = 0;
  string S;
  cin >> A >> B;
  cin >> S;
  auto pos = S.find('-');
  if (pos == A) {
    auto pos2 = S.find('-', pos);
    if (pos == string::npos) {
      cout << "No" << endl;
      return 0;
    }
    if (S.size() == A + B + 1 && pos == A) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
  return 0;
}
