#include <bits/stdc++.h>
using namespace std;
int main(){
  int A,B;
  bool ans = false;
  cin >> A>>B;
  string s;
  cin >> s;
  for(int i = 0;i<=A;i++){
    if(s.at(i) != '-'){
      cnt = false;
    }
    else{
      cnt = true;
      break;
    }
  }
  if(s.at(A+1) != '-'){
    cnt = true;
  }
  for(int i = A+2;i<=A+B+1;i++){
    if(s.at(i) == '-'){
      cnt = true;
      break;
    }
  }
  if(cnt == true){
    cout << "No" << endl;
  }
  else{
    cout << "Yes" << endl;
  }
  return 0;
}
    
    