#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int n, a[1005];
char ch[15];
int dfs(int k, int d) {
  if (k > n) return 1;
  for (int i = d + 1; i <= 10; i++)
    if (a[k - 1] != i && ch[i] == '1') {
      a[k] = i;
      if (dfs(k + 1, i - d)) return 1;
    }
  return 0;
}
int main() {
  scanf("%s", ch + 1);
  n = read();
  if (dfs(1, 0)) {
    puts("YES");
    for (int i = 1; i <= n; i++) printf("%d ", a[i]);
    puts("");
  } else
    puts("NO");
  return 0;
}
