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