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