#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned int a, b, i, l, y1 = 0, y2 = 0, y3 = 1, y4 = 1, me;
  string s;
  cin >> a >> b;
  cin >> s;
  l = s.length();
  if (l == (a + b + 1)) y1 = 1;
  if (s[a] == '-') y2 = 1;
  for (i = 0; i < a; i++) {
    me = s[i];
    if (me < 48 || me > 57) {
      y3 = 0;
      break;
    }
  }
  for (i = a + 1; i < l; i++) {
    me = s[i];
    if (me < 48 || me > 57) {
      y4 = 0;
      break;
    }
  }
  if (y1 && y2 && y3 && y4)
    cout << "YES";
  else
    cout << "NO";
}
