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

int main() {
  int a,b,x;
  string s;
  cin >> a >> b;
  cin >> s;
  x = 0;
  if(s.size() != a+b+1){
    x++;
  }
  
  if(s.at(a) != '-'){
    x++;
    goto here:
  }
  
  for(int i=0;i<a;i++){
    if(s.at(i) == '-'){
      x++;
    }
  }
  for(int i=a+1;i<b;i++){
    if(s.at(i) == '-'){
      x++;
    }
  }
  here :
  if(x == 0){
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}
