#include <bits/stdc++.h>

using namespace std

int main(){
  int a,b;
  cin >> a >> b;
  string s;
  cin >> s;
  if(s.size()!=a+b+1){
    cout << "No";
    return 0;
  }
  for(int x = 0;x<s.size();x++){
    if(s[x]=='-'&&x!=a){
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
  return 0;
}
