#include<string.h>
using namespace std;
int main(){

  int A,B;
  string S;
  int i;
  cin>> A>>B;
  cin>> S;
  i=S.find("-");
  if(((i)==A)&&(S.length()-i-1)==B){
    cout<<"YES"<<endl;
  }else{
    cout<<"No"<<endl;
  }
  //cout<<(i)<<"_"<<(S.length()-i-1)<<endl;
  return 0;
}