#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll ts = 1000000007;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  bool can = true;
  ll a, b;
  string s;
  cin >> a >> b >> s;
  for (ll i = 0; i < a; i++) {
    if ('0' <= s[i] && s[i] <= '9') {
      can = true;
    } else {
      can = false;
    }
  }
  if (s[a] != '-') {
    can = false;
  }
  for (ll i = a + 1; i < b; i++) {
    if ('0' <= s[i] && s[i] <= '9') {
      can = true;
    } else {
      can = false;
    }
  }
  cout << (can ? "Yes" : "No") << "\n";
}
