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