#include <bits/stdc++.h>
using namespace std;

int main() {
	string A, B, S;
	cin >> A >> B >> S;
	if (regex_match(S, regex("\\d{" + A + "}-\\d{" + B + "}"))) {
		cout << "Yes" << endl;
	}
	else cout << "No" << endl;
}
