#include<iostream>
#include<cctype>
using namespace std;
int main(){
	int a,b;
	string s;
	cin>>a>>b>>s;
	if(s.size()!=a+b+1){
		cout<<"No";return 0;
	}
	for(int i=0;i<s.size();i++){
		if(i<=a){
			if(!isdigti(s[i])){
				cout<<"No";
				return 0;
			}
		}
		else{
			if(s[i]!='-'){
				cout<<"No";
				return 0;
			}
		}
	}
	cout<<yes;
}