#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  string arr;
  cin >> arr;
  int flag = 0, counter = 0;
  for (int i = 0; i < arr.size(); i++) {
    if (i == a) {
      if (arr[i] == '-') flag++;
    } else if (arr[i] < '0' && arr[i] > '9')
      counter++;
  }
  if (flag > 0 && counter == 0 && arr.size() == a + b + 1)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
