#include <bits/stdc++.h>
int main(void) {
  int i, A, B;
  char number[A + B + 1];
  scanf("%s", number);
  scanf("%d", &A);
  scanf("%d", &B);
  for (i = 0; i <= A - 1; i++) {
    if (number[i] == '-') {
      printf("No");
      return 0;
    }
  }
  if (number[A] != '-') {
    printf("No");
    return 0;
  }
  for (i = A + 1; i <= A + B; i++) {
    if (number[A + B] == '-') {
      printf("No");
      return 0;
    }
  }
  printf("Yes");
  return 0;
}
