#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  string str;
  cin >> str;
  if (str[a] != '-') {
    cout << "NO" << endl;
    return 0;
  } else
    str[a] = '5';
  for (int i = 0; i < a + b + 1; i++) {
    if (str[i] > '9' || str[i] < '0') {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
