#include <bits/stdc++.h>
using namespace std;
template <typename T>
void print(T t) {
  for (auto &it : t) cout << it << " ";
  cout << '\n';
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
void solve() {
  long long a, b;
  string s;
  cin >> a >> b >> s;
  bool ok = true;
  if (s[a] != '-') {
    cout << "No" << '\n';
    return;
  }
  for (long long i = 0; i < (long long)s.size(); i++) {
    if (i == 3) continue;
    long long val = (s[i] - '0');
    if (val < 0 or val > 9) {
      ok = false;
      break;
    }
  }
  cout << (ok ? "Yes" : "No") << '\n';
}
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr);
  ;
  solve();
}
