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