#include <bits/stdc++.h>
const bool DEBUG = 1;
using namespace std;
inline int omajinai_int_in() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  return n;
}
inline long long omajinai_ll_in() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  return n;
}
inline string omajinai_string_in() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  string n;
  cin >> n;
  return n;
}
inline int int_in() {
  int n;
  cin >> n;
  return n;
}
inline long long ll_in() {
  long long n;
  cin >> n;
  return n;
}
inline string string_in() {
  string n;
  cin >> n;
  return n;
}
template <typename T>
ostream &operator<<(ostream &o, const vector<T> &v) {
  o << '[';
  for (int i = int(0); i < int((v).size()); ++i)
    o << v[i] << (i != v.size() - 1 ? ", " : "");
  o << "]";
  return o;
}
const int INF = 1e9;
const long long LINF = 1e18;
const int MOD = 1e9 + 7;
long long ans;
int sol() {
  string s = string_in();
  int a = int_in(), b = int_in();
  if (s.size() != a + b + 1) return 0;
  for (int i = int(0); i < int((s).size()); ++i) {
    if (i == a && s[i] != '-') return 0;
    if (i != a && s[i] == '-') return 0;
  }
  return 1;
}
int main() { cout << ((sol()) ? "Yes" : "No") << "\n"; }
