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