#include <bits/stdc++.h>
int main(void) {
  int a, b;
  scanf("%d %d", &a, &b);
  char code[11];
  scanf("%s", code);
  if (code[a] != '-' || code[a] - '0' < 0 || code[a] - '0' > 9) {
    printf("No");
    return 0;
  }
  if (code[b] != '\0') {
    printf("No");
    return 0;
  }
  printf("Yes");
  return 0;
}
