#include <iostream>
using namespace std;
int main()
{
	int a,b,f=0;
	char x[100];
	cin>>a>>b>>x;
	for(int i=0;i<a;i++)if(x[i]<'0'||x[i]>'9')f=1;
	if(x[a]!='-')f=1;
	for(int i=a+1;i<a+b+1;i++)if(x[i]<'0'||x[i]>'9')f=1;
	if(x[a+b+1]!='\0'||f)cout << "No\n";
	else cout << "Yes\n";
	
}