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

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