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