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