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