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