#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int a, b, ls;
  cin >> a >> b >> s;
  bool f = true;
  ls = s.length();
  s = " " + s;
  if (s[a + 1] == '-') {
    for (int i = 1; i <= ls; i++)
      if (i != a + 1)
        if (s[i] < '0' || s[i] > '9') f = false;
  } else
    f = false;
  if (f)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
