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