#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fLL;
const double PI = acos(-1.0);
const double EPS = 1e-8;
const int MOD = 998244353;
template <typename T>
void cmin(T &x, T y) {
  if (y < x) x = y;
}
template <typename T>
void cmax(T &x, T y) {
  if (y > x) x = y;
}
long long qpow(long long x, long long n, long long mod = MOD) {
  long long res = 1;
  while (n) {
    if (n & 1) res = res * x % mod;
    x = x * x % mod;
    n >>= 1;
  }
  return res;
}
namespace Solver {
void InitOnce() {}
int n;
char s[25];
void Read() {
  int res = scanf("%s", s + 1);
  if (res == -1) exit(0);
  scanf("%d", &n);
}
vector<int> STACK;
void dfs(int L, int R, int curSide, int preWeight, int dep) {
  if (dep > n) {
    puts("YES");
    for (int i = 0; i < n; ++i) printf("%d ", STACK[i]);
    puts("");
    exit(0);
  }
  if (curSide == 0) {
    for (int i = 1; i <= 10; ++i) {
      if (i == preWeight) continue;
      if (s[i] == '0') continue;
      if (L + i <= R) continue;
      STACK.push_back(i);
      dfs(L + i, R, 1, i, dep + 1);
      STACK.pop_back();
    }
  } else {
    for (int i = 1; i <= 10; ++i) {
      if (i == preWeight) continue;
      if (s[i] == '0') continue;
      if (R + i <= L) continue;
      STACK.push_back(i);
      dfs(L, R + i, 0, i, dep + 1);
      STACK.pop_back();
    }
  }
}
void Solve() {
  dfs(0, 0, 0, 0, 1);
  puts("NO");
  return;
}
}  // namespace Solver
int main() {
  Solver::InitOnce();
  while (true) {
    Solver::Read();
    Solver::Solve();
  }
  return 0;
}
