#include <bits/stdc++.h>
int CountSp(char *, char);
int IsDigit(char *);
int Check(char *, int, int, int);
int Judge(char *, int, int);
int IsDigit(char *s) {
  int cnt = 0;
  while (*s) {
    if (*s >= '0' && *s <= '9') {
      cnt++;
    } else {
      return -1;
    }
    s++;
  }
  return cnt;
}
int CountSp(char *str, char sp) {
  int cnt = 0;
  while (*str) {
    if (*str == sp) {
      cnt++;
    }
    str++;
  }
  return cnt;
}
int Check(char *str, int A, int B, int p) {
  int len = strlen(str);
  int cnt = IsDigit(str);
  int flag = 0;
  if (len != A + B + 1) {
    return 1;
  }
  switch (p) {
    case 1:
      if (cnt == A) {
        flag = 1;
      }
      break;
    case 2:
      if (cnt == B) {
        flag = 1;
      }
      break;
    default:
      flag = 0;
      break;
  }
  return (flag == 1) ? 0 : 1;
}
int Judge(char *buf, int A, int B) {
  char *num;
  int sp, p;
  char *tmp;
  num = (char *)malloc((A + B + 2) * sizeof(char));
  if (num == NULL) {
    printf("Not enough memory.\n");
    exit(1);
  }
  sp = CountSp(num, '-');
  if (strlen(buf) == A + B + 1 && sp == 1) {
    strcpy(num, buf);
  } else {
    return 1;
  }
  p = 1;
  tmp = strtok(num, "-");
  while (tmp != NULL) {
    if (Check(num, A, B, p) == 1) {
      return 1;
    }
    tmp = strtok(NULL, "-");
    p++;
  }
  free(num);
  return 0;
}
int main() {
  char *a;
  int A, B, r;
  scanf("%d%d", &A, &B);
  a = (char *)malloc((A + B + 1) * sizeof(char));
  if (a == NULL) {
    printf("Not enough memory.\n");
    exit(1);
  }
  scanf("%s", a);
  r = Judge(a, A, B);
  if (r == 0) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
  free(a);
  return 0;
}
