#include<bits/stdc++.h>
using namespace std;
int main(){
	int a,b,sum=0;
	cin>>a>>b;
	char s[a+b+10];
	cin.getline(s,a+b+8);
	for(int i=0;i<a+b+1;i++){
		if(i==a+1){
			if(s[i]!='-'){
				cout<<"No"<<endl;
				return 0;
			}
		}
		else{
			if(a[i]>='9'||a[i]<='0'){
				sum++;
			}
		}
	}
	if(!sum){
		cout<<"No"<<endl;
		return 0;
	}
	else{
		cout<<"Yes"<<endl;
		return 0;
	}
}