#include <bits/stdc++.h>
int i, m, q[1024];
char s[12];
int r(int n, int d) {
  for (int &w = q[n] = d + 1; n <= m && w < 11; w++)
    if (w != q[n - 1] && s[w - 1] - '0' && r(n + 1, w - d)) return 1;
  return n > m;
}
int main() {
  scanf("%s%d", &s, &m);
  printf(r(1, 0) ? "YES\n" : "NO");
  for (; q[m + 1] && i < m; printf("%d ", q[++i]))
    ;
}
