#include <bits/stdc++.h>
using namespace std;
int main() {
  int num1 = 0, num2 = 0;
  int coua = 0, coub = 0;
  int key = 0;
  char wo[20];
  cin >> num1 >> num2;
  cin >> wo;
  for (int i = 0; i < num1; i++) {
    if (wo[i] != '-' && wo[i] != '\0') {
      coua += 1;
    }
  }
  if (wo[num1] == '-') {
    key = 1;
  }
  for (int i = num1 + 1; wo[i] != '\0'; i++) {
    coub += 1;
  }
  if (key == 1) {
    if (coua == num1 && coub == num2) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  } else {
    cout << "No" << endl;
  }
  return 0;
}
