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