#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
int main(void) {
  ll a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  bool ans = true;
  for (ll i = 0; i < a; i++) {
    if (s[i] < '0' || '9' < s[i]) ans = false;
  }
  if (s[a] != '-') ans = false;
  for (ll i = a + 1; i < b; i++) {
    if (s[i] < '0' || '9' < s[i]) ans = false;
  }
  if (ans)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
