#include<iostream>
#include<string>

using namespace std;

int main(){
  int i,a,b,j=0;
  string s;
  
  cin>>a>>b;
  cin>>s;
  for(i=0;i<a+b+1;i++){
    if(s[i]>='0'&&s[i]<='9')
      j++;
  }
  if(j==a+b&&s[a]=='-')
    cout<<"Yes"<<endl;
  else
    cout<<"No"<<endl;
  return 0;
  
}