#include "iostream"

using namespace std;

int main()
{
	bool f = true;
	int a, b;
	cin >> a >> b;
	for (int i = 0; i < a + b + 1; i++) {
		char c;
		cin >> c;
		if (i == a) { if (c != '-') f = false; }
		else if (c<'0' || c>'9') f = false;
	}
	if (f) cout << "Yes";
	else cout << "No";
	return 0;
}