#include <bits/stdc++.h>
using namespace std;
vector<int> a;
bool mem[1010][11][11];
bool can(int n, int prev, int bal) {
  if (!n) return mem[n][prev][bal] = (bal != 0);
  if (mem[n][prev][bal]) return mem[n][prev][bal];
  bool ret = 0;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] == prev) continue;
    if ((n % 2 && bal + a[i] > 0) || (n % 2 == 0 && bal - a[i] < 0))
      ret = ret || can(n - 1, a[i], n % 2 ? bal + a[i] : bal - a[i]);
  }
  return mem[n][prev][bal] = ret;
}
vector<int> res;
void get(int n, int prev, int bal) {
  if (!n) return;
  for (int i = 0; i < a.size(); i++) {
    if (mem[n - 1][a[i]][n % 2 ? bal + a[i] : bal - a[i]]) {
      res.push_back(a[i]);
      get(n - 1, a[i], n % 2 ? bal + a[i] : bal - a[i]);
      return;
    }
  }
}
int main() {
  string s;
  while (cin >> s) {
    a.clear();
    memset(mem, 0, sizeof mem);
    int n;
    cin >> n;
    for (int i = 0; i < s.size(); i++)
      if (s[i] == '1') a.push_back(i + 1);
    if (!can(n, 0, 0))
      cout << "NO\n";
    else {
      get(n, 0, 0);
      cout << "YES\n";
      for (int i = 0; i < res.size(); i++) printf("%d ", res[i]);
      ;
      printf("\n");
    }
  }
  return 0;
}
