#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000007;
const long long INFLL = 1000000000000000000LL;
const int MAXN = 200009;
int m, x;
vector<int> weights;
stack<int> order;
void print() {
  if (order.empty()) return;
  int x = order.top();
  order.pop();
  print();
  cout << x << " ";
}
void solve(int bal, int step) {
  if (step == m) {
    cout << "YES" << endl;
    print();
    exit(0);
  }
  if (abs(bal) >= 10) return;
  for (int w : weights) {
    if (step % 2 == 0) {
      if (bal + w > 0 && (order.empty() || w != order.top())) {
        order.push(w);
        solve(bal + w, step + 1);
        order.pop();
      }
    } else {
      if (bal - w < 0 && (order.empty() || w != order.top())) {
        order.push(w);
        solve(bal - w, step + 1);
        order.pop();
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  for (int i = 1; i <= 10; i++) {
    scanf("%1d", &x);
    if (x == 1) weights.push_back(i);
  }
  scanf("%d", &m);
  solve(0, 0);
  cout << "NO" << endl;
}
