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