clude <stdio.h>
int main(void)
{
  int A, B;
  char S[256];
  scanf("%d", &A);
  while(A < 1 || A > 5)
      scanf("%d", &A);
  scanf("%d", &B);
  while(B < 1 || B > 5)
      scanf("%d", &B);
  scanf("%s", S);
  for(int i = 0; i < A + B; i++){
    if(S[A] != '-' || S[i] == '-'){
      printf("NO");
      break;
    }
    else{
      printf("YES");
      break;
    }
  }
  printf("\n");
  return 0;
}