#include<iostream>
using namespace std;
int main(){
    int a,b;
    cin>>a>>b;
	char n[a+b+2];
	cin>>n;
	if(n[a]!='-'){
		cout<<"No"<<endl;
		return 0;
	} 
	for(int i=0;i<a+b+1;i++){
		if(i==a)continue;
		if(n[i]<'0'||n[i]>'9'){
			cout<<"No"<<endl;
			return 0;
		} 
	}
	cout<<"Yes"<<endl;
}