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