#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  int i;
  string t = "Yes";
  if (s.at(a) != '-') {
    t = "No";
  }
  for (i = 0; i < s.size(); i++) {
    if (i == a) {
      continue;
    }
    if (s.at(i) > '9' && s.at(i) < '0') {
      t = "No";
    }
  }
  cout << t;
}
