#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[100];
  int c, b;
  cin >> c >> b;
  cin >> a;
  if (a[c] != '-') {
    cout << "No" << endl;
    return 0;
  }
  for (int i = 1; i < c + b + 1; i++) {
    if ((a[i] != '0') && (a[i] != a[c]) && (a[i] != '1') && (a[i] != '2') &&
        (a[i] != '3') && (a[i] != '4') && (a[i] != '5') && (a[i] != '6') &&
        (a[i] != '7') && (a[i] != '8') && (a[i] != '9')) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  ;
}
