#include <bits/stdc++.h>
int main(void) {
  int a = 0, b = 0;
  int i = 0, j = 0;
  int flg = 1;
  char zip[100] = "";
  scanf("%d %d", &a, &b);
  scanf("%s", zip);
  while (zip[i] != '\0') {
    if (i < a && (zip[i] == '-')) {
      flg = 0;
      break;
    } else if ((i == a) && !(zip[i] == '-')) {
      flg = 0;
      break;
    }
    if (i > a) {
      j++;
    }
    i++;
  }
  if (j > 5) flg = 0;
  if (((a + b + 1) == i) && flg == 1) {
    printf("Yes\n");
  } else
    printf("No\n");
}
