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