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