#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int a, b;
  cin >> a >> b;
  cin >> s;
  int num;
  num = a + b + 1;
  if (num != (int)s.size()) goto no;
  if (s[a] != '-') goto no;
  for (int i = 0; i < num; i++) {
    if (isalpha(s[i]) && i != a) continue;
    if (i == a && s[a] == '-')
      continue;
    else
      goto no;
  }
  cout << "Yes" << endl;
  return 0;
no:;
  cout << "No" << endl;
}
