#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int A, B;

string S, c, d;

int main() {

	cin >> A >> B >> S;

	string ans = "No";
	int last = 0;
	int pos = S.find("-");
	if (pos > 1) {
		c = S.substr(last, pos - last);
		if (A == c.length() && all_of(c.cbegin(), c.cend(), isdigit))
		{
			last = pos + 1;
		}
		d = S.substr(last, S.length());
		if (B == d.length() && all_of(d.cbegin(), d.cend(), isdigit))
		{
			
			ans = "Yes";
		}
	}
	cout << ans << endl;


	return 0;
}