#include <bits/stdc++.h>
using namespace std;
struct _ {
  ios_base::Init i;
  _() {
    cin.sync_with_stdio(0);
    cin.tie(0);
  }
} _;
vector<int> a;
int m;
int ans[1003];
int s[2];
bool backtrack(int pos, int last) {
  if (pos == m)
    return true;
  else {
    for (int i = 0; i < a.size(); i++)
      if (a[i] != last) {
        if (s[pos & 1] + a[i] > s[(pos + 1) & 1]) {
          s[pos & 1] += a[i];
          ans[pos] = a[i];
          if (backtrack(pos + 1, a[i])) return true;
          s[pos & 1] -= a[i];
        }
      }
  }
  return false;
}
int main() {
  string w;
  cin >> w;
  cin >> m;
  for (int i = 0; i < 10; i++)
    if (w[i] == '1') a.push_back(i + 1);
  if (backtrack(0, 0)) {
    puts("YES");
    for (int i = (0); i < ((m)); i++) printf("%d ", ans[i]);
    printf("\n");
  } else
    puts("NO");
  return 0;
}
