#include <stdio.h>
int main(void){
  int a,b,i;
  char s[15];
  scanf("%d%d\n%s",&a,&b,s);
  if (s[a]!='-'){
    printf("No\n");
    return 0;
  }
  s[a]='0';
  for (i=0;s[i];i++){
    if ((int)s[i]<48||(int)s[i]>57){
      printf("No\n");
      return 0;
    }
  }
  printf("Yes\n");
  return 0;
}