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