#include <iostream>
using namespace std;
int a, b, i, j;
string s;
int main() {
	cin>>a>>b>>s;
	for(i=0; s[i] && s[i]!='-'; i++);
	for(j=i+1; s[j] && s[j]!='-'; j++);
	cout<<(s[j]=='\0' && i==a && j-i-1==b ? "Yes":"No");
	return 0;
}