#include<bits/stdc++.h>
using namespace std;
int main()
{
	int A,B;
	string S;
	cin>>A>>B>>S;
	static int sum=0;
	if(S[A]=='-')
	{
		for(int i=0;i<S.size();i++)
		{
			if(i!=A&&isdigit(S[i]))
			{
				
				sum++;
			}
		}
		if(sum==A+B)
		cout<<"Yes";
		else cout<<"No";
	}
	else cout<<"No";
	return 0;
}