#include <bits/stdc++.h>
using namespace std;
int n, m, ans, cnt, flag;
int a[15], path[1005];
char s[15];
void dfs(int le, int ri, int last, int pos) {
  if (flag) return;
  int i, j;
  if (pos > m) {
    flag = 1;
    printf("YES\n");
    for (i = 1; i < m; i++) {
      printf("%d ", path[i]);
    }
    printf("%d\n", path[i]);
    return;
  }
  for (i = 1; i <= cnt; i++) {
    if (a[i] != last) {
      if ((pos & 1) && le + a[i] > ri) {
        path[pos] = a[i];
        dfs(le + a[i], ri, a[i], pos + 1);
      } else if (!(pos & 1) && ri + a[i] > le) {
        path[pos] = a[i];
        dfs(le, ri + a[i], a[i], pos + 1);
      }
    }
  }
}
int main() {
  int i, j;
  while (~scanf("%s%d", s, &m)) {
    cnt = 0;
    for (i = 0; i < 10; i++) {
      if (s[i] == '1') cnt++, a[cnt] = i + 1;
    }
    flag = 0;
    dfs(0, 0, 0, 1);
    if (!flag) printf("NO\n");
  }
  return 0;
}
