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