#include<bits/stdc++.h>

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