#include <bits/stdc++.h>
using namespace std;
const int MAXN = 20;
const int MAXM = 1010;
int n, m;
char s[MAXN];
int bio[MAXN][MAXN][MAXM];
vector<int> v;
void dfs(int last, int raz, int k) {
  if (k == m) {
    puts("YES");
    for (int i = (0); i < int((int)v.size()); i++) printf("%d ", v[i]);
    puts("");
    exit(0);
  }
  bio[last][raz][k] = 1;
  for (int i = (1); i < int(11); i++) {
    if (s[i - 1] == '0' || i == last) continue;
    int x = i;
    if (k % 2) x = -x;
    bool a = raz > 0;
    bool b = (raz + x) > 0;
    if (a == b || raz + x == 0) continue;
    v.push_back(i);
    dfs(i, raz + x, k + 1);
    v.pop_back();
  }
}
int main() {
  scanf("%s", s);
  n = 10;
  scanf("%d", &m);
  dfs(0, 0, 0);
  puts("NO");
  return 0;
}
