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