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