#include <bits/stdc++.h>
using namespace std;
const long long PINF = 1E9;
const long long NINF = -1E9;
const long long M = 1E9 + 7;
const double EPS = 1E-9;
const double PI = 2 * acos(0);
void print_arr(const vector<long long> &a) {
  for (int i = 0; i < (int)a.size(); i++) cout << a[i] << " ";
  cout << '\n';
}
int m;
vector<long long> weights, ans;
bool visited[1001][11][11];
void dfs(int step, int balance, int prev_weight) {
  if (visited[step][balance][prev_weight]) return;
  visited[step][balance][prev_weight] = true;
  if (step == m) {
    cout << "YES"
         << "\n";
    print_arr(ans);
    exit(0);
  }
  for (int i = 0; i < (int)weights.size(); i++) {
    int w = weights[i];
    if (prev_weight != w && abs(balance) < w) {
      ans[step] = w;
      if (step % 2 == 0)
        dfs(step + 1, balance + w, w);
      else
        dfs(step + 1, balance - w, w);
    }
    ans[step] = 0;
  }
  visited[step][balance][prev_weight] = false;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  cin >> s;
  for (int i = 0; i < 10; i++) {
    if (s[i] == '1') weights.push_back(i + 1);
  }
  cin >> m;
  ans.resize(m);
  dfs(0, 0, 0);
  cout << "NO"
       << "\n";
  return 0;
}
