#include <iostream>
using namespace std;

int main(){
  int A,B,lp,Ar= 0,Br = 0;
  char S[11];
  int flag = 0;

  cin >> A >> B;
  cin >> S;

  lp = 0;
  while (lp < 12){
    if (S[lp] == '0' or '1' or'2' or '3' or '4' or '5' or '6' or '7' or '8' or '9'){
      if (flag == 0){
        Ar ++;
      }else{
        Br ++;
      }
    }else{
      if (S[lp] == '-'){
        flag ++;
    }

    lp++;
  }
  if (S[A+1] == "-" and Br == B and Ar == A){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}
