#include <bits/stdc++.h>
using namespace std;
const long long Long_max = numeric_limits<long long>::max();
const int Int_max = numeric_limits<int>::max();
int main() {
  int a, b;
  string str;
  cin >> a >> b;
  cin >> str;
  if (a + b + 1 != (int)str.size()) {
    cout << "No\n";
    return 0;
  }
  vector<int> pos;
  for (int i = 0; i < (int)str.size(); i++) {
    if (str[i] == '-') pos.push_back(i);
  }
  if ((int)pos.size() == 1 && pos.back() + 1 == a + 1) {
    cout << "Yes\n";
  } else
    cout << "No\n";
  return 0;
  ;
  ;
  ;
  ;
}
