#include <bits/stdc++.h>
using namespace std;
int main() {
  int a = 0;
  int b = 0;
  string pos;
  bool ans = true;
  cin >> a >> b >> pos;
  for (int i = 0; i < a; ++i) {
    if (pos[i] == '-') {
      ans = false;
    }
  }
  if (pos[a] != '-') {
    ans = false;
  }
  for (int j = a + 1; j < b; ++j) {
    if (pos[j] == '-') {
      ans = false;
    }
  }
  if (ans == true) {
    cout << "Yes";
  } else {
    cout << "No";
  }
  return 0;
}
