#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f, N = 1005, MOD = 100000007;
const double eps = 1e-6;
int a[15], m, ans[N], ct;
char b;
int main() {
  ct = 0;
  for (int i = 1; i <= 10; i++) {
    scanf("%c", &b);
    if (b == '1') {
      a[ct++] = i;
    }
  }
  scanf("%d", &m);
  bool flag = 0;
  int s[2], tmp;
  int i, j, tail;
  for (int k = 0; k < ct; k++) {
    s[0] = s[1] = 0;
    s[0] = ans[0] = a[k];
    tail = k;
    tmp = 1;
    for (i = 1; i < m; i++) {
      for (j = 0; j < ct; j++) {
        if (j == tail) continue;
        if (s[tmp] + a[j] > s[tmp ^ 1]) {
          s[tmp] += a[j];
          ans[i] = a[j];
          tail = j;
          tmp ^= 1;
          break;
        }
      }
      if (j == ct) {
        flag = 0;
        break;
      }
    }
    if (i == m) {
      flag = 1;
      break;
    }
  }
  if (flag) {
    printf("YES\n");
    for (int k = 0; k < m; k++) {
      printf("%d ", ans[k]);
    }
    puts("");
  } else
    printf("NO\n");
  return 0;
}
