#include <bits/stdc++.h>
using namespace std;
int dir[4][2] = {-1, 0, 0, 1, 0, -1, 1, 0};
vector<int> c;
char s[1100];
int flag[1100];
int a[1100];
int can = 0, m;
bool dfs(int p1, int p2, int s1, int s2, int cnt) {
  if (cnt == m) {
    can = 1;
    puts("YES");
    for (int i = 0; i < m; i++) printf("%d ", a[i]);
    return 1;
  }
  int now = cnt & 1;
  for (int i = 0; i < c.size(); i++) {
    int k = c[i];
    if (now == 0) {
      if (p2 == k || s1 + k <= s2) continue;
      a[cnt] = k;
      if (dfs(k, p2, s1 + k, s2, cnt + 1)) return 1;
    } else {
      if (k == p1 || s2 + k <= s1) continue;
      a[cnt] = k;
      if (dfs(p1, k, s1, s2 + k, cnt + 1)) return 1;
    }
  }
  return 0;
}
int main() {
  int n = 0;
  scanf("%s", s);
  for (int i = 0; i < 10; i++) {
    flag[i + 1] = s[i] - '0';
    if (flag[i + 1]) {
      c.push_back(i + 1);
      n++;
    }
  }
  scanf("%d", &m);
  dfs(-1, -1, 0, 0, 0);
  if (!can) puts("NO");
  return 0;
}
