#include <bits/stdc++.h>
using namespace std;
int main(void) {
  char numder[100];
  int a, b, i;
  bool flg = true;
  cin >> a >> b;
  cin >> numder;
  for (i = 0; i < a; i++) {
    if (numder[i] < '0' || numder[i] > '9') {
      flg = false;
    }
  }
  if (numder[a] != '-') {
    flg = false;
  }
  for (i = a + 1; i < a + b + 1; i++) {
    if (numder[i] < '0' || numder[i] > '9') {
      flg = false;
    }
  }
  cout << ((flg) ? "No" : "Yes") << endl;
  return 0;
}
