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