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