#include<algorithm>
using namespace std;
typedef long long ll;
int main() {
	int a, b;
	cin >> a >> b;
	string s;
	cin >> s;
	int count = 0; 
	int ans;
	for (int i = 0; i < s.size(); i++) {
		if (s[i] == '-') {
			count++;
			ans = i;
		}
	}
	if (count != 1) {
		cout << "No" << endl;
		return 0;
	}
	else if (count == 1 && ans == a) {
		cout << "Yes" << endl;
	}
	return 0;
}