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