#include <iostream>
#include <cstring>
using namespace std;
int main()
{
	int a,b;
	char x[40];
	cin>>a>>b>>x;
	if(strlen(x)!=a+b+1||x[a]!='-'){
		cout<<"No"<<endl;
		return 0;
	}
	for(int i=0;i<a+b;i++)
	if(i!=a&&(x[i]>'9'||x[i]<'0')){
		cout<<"No"<<endl;
		return 0;
	}
	cout<<"Yes"<<endl;
	return 0;
}