#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  set<char> num = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
  for (int i = 0; i < a; i++) {
    if (!num.count(s.at(i))) {
      cout << "NO" << endl;
      return 0;
    }
  }
  if (s.at(a) != '-') {
    cout << "NO" << endl;
    return 0;
  }
  for (int i = 0; i < b; i++) {
    if (!num.count(s.at(a + 1 + i))) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
}
