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

int main() {
  int A, B;
  string S;
  cin >> A >> B >> S;
  if(S.at(A+1)!="-") {
    cout << "No" <<endl;
  }
  for(int i=0; i<A; i++) {
    if(S.at(i)!=0,1,2,3,4,5,6,7,8,9) {
      cout << "No" <<endl;
    }
  }
  for(int i=0; i<B; i++) {
    if(S.at(A+B)!=0,1,2,3,4,5,6,7,8,9) {
      cout << "No" << endl;
    }
  }
  else {
    cout << "Yes" <<endl;
  }
}