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