#include <bits/stdc++.h>

using namespace std;

int main() {

	int a,b;
	cin >> a >> b;
	string s;
	cin >> s;
	if(s.length()==a+b+1 and s[a]=='-'){
		for(int i=0;i<s.length();i++){
			if(s[i]=='-' and i!=a){
				cout << "No";
				return 0;
			}
		}
		cout << "Yes";
	}
	else
		cout << "No";
}