#include <bits/stdc++.h>
using namespace std;

int main(){
 int a,b;
 string s;
 cin >> a >> b >>s;
 int check =0;
 for(int i=0;i<s.size();i++){
   if(s.at(i)=='-') check ++;
 }
 if(s.at(a)=='-'&&s.size()==a+b+1&&check ==1){
   cout <<"Yes" << endl;
 }
 else{
   cout <<"No" << endl;
 }
}
