#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a,b;
	cin>>a>>b;
	string c;
	cin>>c;
	if(c[a]!='-')
	{
		cout<<"No\n";
		return 0;
	}
	c[a]='1';
	for(int i=0;i<=a+b;i++)
	{
		if(c[i]<'0'||c[i]>'9')
		{
			cout<<"No\n";
			return 0;
		}
	}
	cout<<"Yes\n";
	return 0;
	
}