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