#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  bool ok = false;
  string s;
  cin >> a >> b >> s;
  int i;
  for (i = 0; i < a; i++) {
    if (s[i] >= '0' && s[i] <= '9') continue;
    ok = true;
  }
  if (s[i] != '-') {
    ok = true;
  }
  i++;
  a += 1 + b;
  for (; i < b; i++) {
    if (s[i] >= '0' && s[i] <= '9') continue;
    ok = true;
  }
  cout << (ok ? "No" : "Yes") << endl;
  return 0;
}
