#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c = 0, d = 0;
  string s;
  cin >> a >> b;
  cin >> s;
  if (s.at(a) == '-') {
    c++;
  }
  for (int i = 0; i < s.length(); ++i) {
    if (!(s.at(i) >= 48 && s.at(i) <= 57)) {
      d++;
    }
  }
  if (c == 1 && d == 1) {
    cout << "Yes"
         << "\n";
  } else if (d > 1) {
    cout << "No"
         << "\n";
  }
  return 0;
}
