#include <bits/stdc++.h>
using namespace std;
string weights;
int m;
stack<int> soln;
bool dfs(int placed, int last, int balance) {
  if (placed == m) {
    cout << "YES" << endl;
    return true;
  }
  for (int i = 0; i < weights.size(); i++) {
    if (weights[i] == '1') {
      if (i + 1 != last) {
        if ((i + 1) > abs(balance)) {
          int next_balance = (i + 1) - abs(balance);
          next_balance *= (balance >= 0 ? -1 : 1);
          if (dfs(placed + 1, i + 1, next_balance)) {
            soln.push(i + 1);
            return true;
          }
        }
      }
    }
  }
  return false;
}
int main() {
  cin >> weights;
  cin >> m;
  if (!dfs(0, -1, 0)) {
    cout << "NO" << endl;
  } else {
    while (!soln.empty()) {
      cout << soln.top() << " ";
      soln.pop();
    }
  }
}
