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

int main(){

  int a;
  int b;
  string s;
  bool check = true;

  cin >> a >> b >> s;

  for(int i = 0;i < s.size();i++){
    if(i == a){
      // if(s[i+1] == '-'){
        if(s[i] == '-'){
        check = true;
      }else if(s[i] >= "0" && s[i] <= "9"){
        check = true;
      }
    }

    if(check == true){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }

    return 0;
  }
}
