#include<iostream>
using namespace std;

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

	int Q = 0;

	for (int i = 0; i < S.size(); i++) {
		if (S[i] == '-') Q++;
	}

	if (S[A] == '-' && Q == 1) {
		cout << "Yes" << endl;
	}
	else cout << "No" << endl;
	
}