#include <bits/stdc++.h>
int main() {
  int a, b;
  char s[20];
  int pos = 1;
  scanf("%d %d", &a, &b);
  scanf("%s", s);
  if (s[a] != '-') {
    pos = 0;
  }
  for (int i = 0; s[i] != '\0'; i++) {
    if (s[i] != s[a]) {
      if (s[i] < '0' || s[i] > '9') {
        pos = 0;
        break;
      }
    }
  }
  (pos) ? printf("Yes\n") : printf("No\n");
  return 0;
}
