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