#include <bits/stdc++.h>
using namespace std;
int main() {
  int l1, l2;
  char s[100];
  cin >> l1 >> l2;
  if (l1 < 1 || l1 > 5 || l2 < 1 || l2 > 5) {
    cout << "No" << endl;
    return 1;
  }
  cin >> s;
  for (int i = 0; i < l1; ++i) {
    char c = s[i];
    if (c < '0' || c > '9') {
      cout << "No" << endl;
      return 1;
    }
  }
  if (s[l1] != '-') {
    cout << "No" << endl;
    return 1;
  }
  for (int i = l1 + 1; i < l1 + l2 + 1; ++i) {
    char c = s[i];
    if (c < '0' || c > '9') {
      cout << "No" << endl;
      return 1;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
