#include<bits/stdc++.h>
using namespace std;

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