#include <bits/stdc++.h>
using namespace std;
int main(){
  int A,B;
  string S;
  cin >> A >> B >> S;
  bool b = 1;
  if(S.at(A) == '-'){
    for(int i = 0;i < A + B;i++){
      if(i != A){
        if(S.at(i) == 0 ||S.at(i) ==1 || S.at(i) ==2 ||S.at(i) ==3 ||S.at(i) ==4 ||S.at(i) ==5 ||S.at(i) ==6 ||S.at(i) ==7 ||S.at(i) ==8 ||S.at(i) == 9 )
          else b = 0;
      }
    }
   if(b) cout << "Yes" << endl;
  }
  else cout << "No" << endl;
}
    
   
  