#include <bits/stdc++.h>
using namespace std;

int main() {
  int A, B;
  string S;
  
  cin >> A >> B;
  cin >> S;
  if (S.size() == A + B + 1 && S.at(A) == '-'){
    for(int i; i < S.size(); i++){
        if (i == A && S.at(i) != '-') continue;
        else {
          cout << "No" << endl;
          return;
        }
    }
  }
  else {
    cout << "No" << endl;
    return;
  }
  
  cout << "Yes" << endl;
  
}
