#include <bits/stdc++.h>
int main() {
  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;
}
