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