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