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