#include <bits/stdc++.h>
using namespace std;
const double PI = 2 * acos(0.0);
int CASE = 1, TEST = 1;
struct vpair {
  int a;
  int b;
  vpair(int a, int b) {
    this->a = a;
    this->b = b;
  }
};
bool cmp(vpair &a, vpair &b) {
  if (a.a < b.a)
    return true;
  else if (a.a == b.a) {
    if (a.b < b.b)
      return true;
    else
      return false;
  } else {
    return false;
  }
}
int n, a, b, c = 1;
string s;
int main(void) {
  scanf("%d %d ", &a, &b);
  getline(cin, s);
  n = s.length();
  if (a + b + 1 > n) {
    printf("NO\n");
    return 0;
  }
  for (int i = 0; i < a; i++) {
    if (s[i] - '0' <= 9 && s[i] - '0' >= 0) {
      c = 1;
    } else {
      printf("NO\n");
      return 0;
    }
  }
  if (s[a] == '-')
    c = 1;
  else {
    printf("NO\n");
    return 0;
  }
  for (int i = a + 1; i < n; i++) {
    if (s[i] - '0' <= 9 && s[i] - '0' >= 0) {
      c = 1;
    } else {
      printf("NO\n");
      return 0;
    }
  }
  if (c == 1) printf("YES\n");
  return 0;
}
