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

int main() {
  int A,B;
  int flag1 = 0;
  int flag2 = 0;
  cin >> A >> B;
  string s;
  cin>>s;
  if(s[A]!= '-'){
   cout << "No" <<endl;
  }else{
    for(int i=0;i<A;i++){
      if(0>s[i] || s[i]>9){
           flag1 = 1;
        
      }
    }
    for(int i=A+1;i<A+B+2;i++){
       if(0>s[i] || s[i]>9){
           cout<< "No" <<endl;
         flag2 = 1;
      }
    }
    
  }
  if(flag1 = 1 && flag2 = 1){
    cout << "No" << endl;
  }else{
    cout<< "Yes" << endl; 
}
  flag1=0;
  flag2=0;
