#include<iostream>
using namespace std;
int main()
{
  int a,b;
  cin>>a>>b;
  string s;
  cin>>s;
  if(s.size()!=(a+b+1)){
    cout<<"NO"<<endl;
    return 0;
  }
  for(int i=0;i<s.size();i++){
    if(i!=a){
      if(!(s[i]>='0' && s[i]<='9')){
        cout<<"NO"<<ehdl;
        return 0;
      }
    }else if(s[i]!='-'){
      cout<<"NO"<<endl;
      return 0;
    }
  }
      cout<<"Yes"<<endl;
  return 0;
}
    