#include <bits/stdc++.h>

using namespace std;

int main() {
  int a, b;
  cin >> n >> b;
  string s;
  cin >> s;
  if (s[a] != '-') {
    cout << "No\n";
    return 0;
  }
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '-' && i != a) {
      cout << "No\n";
      return 0;
    }
  }
  cout << "Yes\n";

  return 0;
}
