#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  if (s[a] != '-') {
    cout << "No" << '\n';
    return 0;
  }
  s.erase(a);
  for (auto &i : s) {
    if (i < '0' || i > '9') {
      cout << "No" << '\n';
      return 0;
    }
  }
  cout << "Yes" << '\n';
}
