#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 0, 1, -1, 1, 1, -1, -1};
int dy[] = {1, -1, 0, 0, -1, 1, 1, -1};
int main() {
  int a, b;
  cin >> a >> b;
  string x;
  cin >> x;
  int cnt = 0;
  for (int i = 0; x[i]; ++i) {
    if (isdigit(x[i]) && i != a) {
      ++cnt;
    }
  }
  if (x[a] != '-' || cnt != a + b) {
    cout << "NO" << endl;
    return 0;
  }
  cout << "YES" << endl;
  return 0;
}
