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