#include<iostream>
#include<string>
using namespace std;

int main()
{
	int a,b;
	string s;
	cin>>a>>b>>s;
	
	bool f=1;
	for(int i=0;i<a;i++)
		if(s[i]<'0'||'9'<s[i]) f=0;
	if(s[a]!='-') f=0;
	for(int i=a+1;i<=a+b;i++)
		if(s[i]<'0'||'9'<s[i]) f=0;
	
	cout<<(f? "Yes":"No")<<endl;
	
	return 0;
}
