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