#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  string t = "0123456789";
  bool flag = true;
  for (long long i = 0; i < s.size(); i++) {
    if (i == 3) {
      if (s[i] != '-') {
        flag = false;
      }
    } else if ((long long)t.find(s[i]) == -1) {
      flag = false;
    }
  }
  cout << (flag ? "Yes" : "No") << endl;
}
