#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  getchar();
  char s[100];
  scanf("%s", s);
  if (strlen(s) != a + b + 1 || s[a] != '-' || a > 5 || a < 1 || b > 5 ||
      b < 1) {
    cout << "NO";
    return 0;
  }
  for (int i = 0; i <= a + b; i++) {
    if (i == a) continue;
    if (s[i] < 48 || s[i] > 57) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
  return 0;
}
