#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  string s;
  cin >> a >> b >> s;
  bool flag = true;
  int sLeng = s.length();
  if (a < 1 || b > 5 || 0 < sLeng || sLeng > 9) {
    flag = false;
  } else if (sLeng != (a + b + 1)) {
    flag = false;
  } else if (s.find("-") != a) {
    flag = false;
  }
  if (flag == true) {
    cout << "Yes";
  } else {
    cout << "No";
  }
}
