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