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

int main() {
  int a;
  string s;
  
  cin >> a >> b;
  cin >> s;
  
  if(s.size() == a + b + 1 && s.at(a) == '-'){
    cout << "Yes" << endl;
  }
  else cout << "No" << endl;;
  
  
}
