#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int a, b;
  int flag = 0;
  string s;
  cin >> a >> b;
  cin >> s;
  for (int i = 0; i < a; i++) {
    if (s[i] == '-') {
      flag = 1;
    }
  }
  for (int i = b; i < 0; i--) {
    if (s[i] == '-') {
      flag = 1;
    }
  }
  if (flag == 0 && s[a] == '-') {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
