#include<iostream.h>
#include<string.h>
using namespace std;
int main(void)
{
	int a,b,s;
	string str;
	
	cin>>a>>b;
	cin>>str;
	
	if( (a>0&&a<5) && (b>0&&b<5) )
	{
		if( (str.size()) == (a+b+1) )
		{
			if((str.find("-")+1)== a+1 )
			{
				for(int i=0;i<a+b+1;i++){
					if((str[i]<'0') || (str[i]>'9')) s--;
					s++;
				}
					
				if(s==(a+b)) {
					cout<<"Yes";
				}else cout<<"No";
			}else cout<<"No";
			
		}else cout<<"No";
	
	}else cout<<"No";
	
	return 0;
	
}
