#include<iostream>
#include<cstdio>
using namespace std;
int a,b;
string s;
int main(){
	int i,j;
	scanf("%d %d",&a,&b);
	cin>>s;
	if(s[a]!='-'){
		cout<<"No";
		return 0;
	}
	for(i=0;i<=a+b;i++){
		if(i!=a){
			if(s[i]<'0'||s[i]>'9'){
				cout<<"No";
				return 0;
			}
		}
	}
	cout<<"Yes";
	return 0;
}