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