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

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