#include <bits/stdc++.h>

using namespace std;

int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	int a, b;
	string s;
	cin >> a >> b;
	cin >> s;
	int k = 0;
	for (int i = 0; i < s.length(); ++i){
		if (s[i] == '-'){
			++k;
		}
	}
	cout << (k == 1 && s[a] == '-' ? "Yes":"No");	
	return 0;
}
