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