#include <algorithm>
#include <iostream>
using namespace std;


int main(){
	int A, B;
	cin >> A >> B;
	char S[A+B+1];
	cin >> S;
	for(int i=0; i<A){
		if(S[i]=='-'){
			cout << "Yes";
			return 0;
		}
	}
	if(S[A]!='-'){
		cout << "No";
		return 0;
	}
	for(int i=A+1; i<A+B+1; i++){
		if(S[i]=='-'){
			cout << "No";
			return 0;
		}
	}
	cout << "Yes" ;
}