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