#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B;
  string s;
  cin >> A >> B >> s;
  int t = s.size();
  if ((A + B + 1) != t || s[A] != '-') {
    cout << "No" << endl;
    return 0;
  } else {
    for (int i = 0; i < t; i++) {
      if (i == A) continue;
      if (s[i] >= 0 && s[i] <= 9)
        continue;
      else {
        cout << "No" << endl;
        return 0;
      }
    }
  }
  cout << "Yes\n";
  return 0;
}
