#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  string s;
  cin >> a >> b >> s;
  bool flag = true;
  if (s.length() == a + b + 1 && s[a + 1] == '-') {
    for (int i = 0; i < a + b + 1; i++) {
      if (i != a + 1) {
        if (!(s[i] == '0' && s[i] <= '9')) {
          flag = false;
        }
      }
    }
  } else {
    flag = false;
  }
  if (flag) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
