#include <bits/stdc++.h>
using namespace std;
vector<int> v, way;
int m;
void dfs(int n, int side, vector<int> &s) {
  if (n == m) {
    cout << "YES\n";
    for (int x : way) cout << x << ' ';
    exit(0);
  }
  int p = s[side ^ 1] - s[side] + 1;
  if ((*max_element(v.begin() + p, v.end())) == 0) return;
  for (; p <= 10; p++)
    if (v[p] == 1 &&
        ((int)(way).size() == 0 || way[(int)(way).size() - 1] != p)) {
      way.push_back(p);
      s[side] += p;
      dfs(n + 1, side ^ 1, s);
      s[side] -= p;
      way.pop_back();
    }
}
int main() {
  string s;
  cin >> s >> m;
  int i, j, z;
  v.resize(15);
  for (i = 1; i <= 10; i++) v[i] = s[i - 1] - '0';
  vector<int> sd(2);
  dfs(0, 0, sd);
  cout << "NO\n";
  return 0;
}
