#include <bits/stdc++.h>
using namespace std;
int main(){
  int A,B;
  cin>>A>>B;
  string S;
  cin>>S;
  
  if(
    (int)(S.length())!=A+B+1
    || S[A]!='-'
  ){
  	cout<<"No"<<endl;
    return 0;
  }
  
  bool isVaild=true;
  for(int i=0,l=A+B+1;i<l;++i){
    id(i==A)continue;
    if('0'<=S[i]&&S[i]<='9')continue;
    isVaild=false;
    break;
  }
  cout<<(isVaild?"Yes":"No")<<endl;
}