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