#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int A;
  int B;
  int sleng;
  string S;
  cin >> A >> B;
  cin >> S;
  sleng = A + B + 1;
  if ((int)S.size() != sleng) {
    cout << "No" << endl;
    return 0;
  }
  if (S[A] != '-') {
    cout << "No" << endl;
    return 0;
  }
  cout << "Yes" << endl;
  return 0;
}
