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