#include <iostream>
#include <algorithm>
#include <vector>
#include <iostream>
#include <string>
#define max(x, y)	(((x) > (y))? (x) : (y))
#define abs(x)		(((x) < 0)? (-1*(x)) : (x))
#define REP(x,y)	for (i=(x);i<(y);i++)
using namespace std;

//int dp[10000][10000];
int i,A,B;
string S;

int main() {
	cin >> A >> B ;
  	cin >> S;
  	bool ng;
  
  	REP(0,A+B+1){
	    if (i!=A && S[i]=='-') ng=TRUE;
    } 
  
  	if ( !ng && S[A] == '-'  && S.size() == (A+B+1))
		cout << "Yes" << endl;
  	else 
		cout << "No" << endl;

	return 0;
}