#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  string s;
  cin >> a >> b;
  cin >> s;
  int aa = s.size();
  int bb;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '-') {
      aa = i;
      break;
    }
  }
  bb = s.size() - aa - 1;
  if (a == aa || b == bb)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
