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