#include<bits/stdc++.h>
using namespace std;
template<typename T>inline void read(T &x){
	short f=1;x=0;char c=getchar();
	while(!isdigit(c)){
		if(c=='-')f=-1;
		c=getchar();
	}
	while(isdigit(c)) x=(x<<3)+(x<<1)+(c^48),c=getchar();
	x*=f;
}
int main(){
	int a,b;
	string s;
	read(a),read(b);
	cin>>s;
	if(s[a]!='-')cout<<"No"<<endl,return 0;
	int gs=0;
	for(int i=0;i<=a+b;i++)
		if(!isdigit(s[i]))gs++;
	if(gs>2)cout<<"No"<<endl;
	else cout<<"Yes"<<endl;
	return 0;
}
