#include <bits/stdc++.h>
int noa() {
  int m;
  scanf("%d\n", &m);
  int ptoday = 24;
  int res;
  res = ptoday + (ptoday - m);
  return res;
}
int nob() {
  int a;
  int b;
  char s[16];
  int slen, len;
  scanf("%d\n", &a);
  scanf("%d\n", &b);
  scanf("%s\n", s);
  slen = strlen(s) - 1;
  if (strchr(s, '-') == NULL) {
    return 0;
  }
  if (strstr(strchr(s, '-'), strchr(s + a, '-')) == NULL) {
    return 0;
  }
  if (slen == a + b) {
    return 0;
  }
  len = strlen(strchr(s, '-'));
  if (len != a + 1) {
    return 0;
  }
  return 1;
}
int main(void) {
  int res;
  res = nob();
  if (res == 1) {
    printf("%s", "Yes");
  } else {
    printf("%s", "No");
  }
  return 0;
}
