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