#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  while (scanf("%d%d", &n, &m) == 2) {
    string s;
    cin >> s;
    int flag = 1;
    for (int i = 0; i < n; i++) {
      if (s[i] < '0' || s[i] > '9') {
        flag = 0;
      }
    }
    if (s[n] != '-') flag = 0;
    for (int i = n + 1; i < n + m + 1; i++) {
      if (s[i] < '0' || s[i] > '9') {
        flag = 0;
      }
    }
    if (flag) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }
  return 0;
}
