#include<bits/stdc++.h>
using namespace std;
int main()
{
  int a,b,n;
  cin>>a>>b;
  string s;
  cin>>s;
  n=count(s.begin(),s.end(),'-');
  if(s[a]=='-'&&n==1)
  {
   cout<<"Yes"<<endl;
  }
  else
  {
    cout<<"No"<<endl;
  }
  return 0;
}
