#include <stdio.h>

int main(){
  int n, m;
  scanf("%d %d", &n, &m);
  int route[n][n];
  int sign[n];
  int depth_node[n];
  for(int i = 0; i < n; i++){
    sign[i] = -1;
    depth_node[i] = -1;
    for(int j = 0; j < n; j++){
      route[i][j] = 0;
    }
  }
  sign[0] = 0;

  

  printf("Yes\n");
  for(int i = 1; i < n; i++){
    printf("%d\n", sign[i] + 1);
  }
  return 0;
}
