#include <iostream>
#include <regex>
#include <string>
using namespace std; 
int main()
{
	int a,b;
	cin>>a>>b;
	string s;
	cin>> s;
	regex r("\\d{"+to_string(a)+"}-\\d{"+to_string(b)+"}");
	bool f=regex_match(s,r);
	cout << (f?"Yes":"No");
}