#include <bits/stdc++.h>
using namespace std;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
bool debug = false;
int main() {
  int a, b;
  bool ok = true;
  string s;
  cin >> a >> b >> s;
  for (int i = 0; i < int(a); i++) {
    if (s[i] != '-')
      continue;
    else
      ok = false;
  }
  if (s[a] != '-') ok = false;
  for (int i = (a + 1); i < int(b); i++) {
    if (s[i] != '-')
      continue;
    else
      ok = false;
  }
  if (ok)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
