#include <bits/stdc++.h>
using namespace std;
vector<int> weights;
char msg[11];
int M;
vector<int> stk;
bool rec(int idx, int left, int right) {
  if (idx == M) {
    if (left > right) {
      return true;
    }
    return false;
  }
  int i;
  for (i = 0; i < weights.size(); i++) {
    if (stk.size() > 0 && weights[i] == stk[stk.size() - 1]) continue;
    if (weights[i] + right > left) {
      stk.push_back(weights[i]);
      if (rec(idx + 1, right + weights[i], left)) return true;
      stk.pop_back();
    }
  }
  return false;
}
int main() {
  cin >> msg >> M;
  int i;
  for (i = 0; i < 10; i++)
    if (msg[i] == '1') weights.push_back(i + 1);
  if (rec(0, 0, 0)) {
    printf("YES\n");
    for (i = 0; i < stk.size(); i++) printf("%d ", stk[i]);
  } else
    printf("NO");
  return 0;
}
