#include<iostream>
#include<string>
using namespace std;

int main() {
	size_t A, B, fpos, rpos;
	string S;
	cin >> A >> B;
	cin >> S;

	fpos = S.find('-');
	rpos = S.rfind('-');

	if (fpos == -1 || fpos != A || fpos != rpos) cout << "No" << endl;
	else cout << "Yes" << endl;

	return 0;
}