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