#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:258435456");
using namespace std;
int m;
vector<int> a, ans;
bool dfs(int x, int y, int v, int p) {
  if (v == m) return true;
  if (!(v & 1)) {
    for (int i = 0; i < a.size(); i++)
      if ((a[i] != p) && (x + a[i] > y))
        if (dfs(x + a[i], y, v + 1, a[i])) {
          ans.push_back(a[i]);
          return true;
        }
  } else
    for (int i = 0; i < a.size(); i++)
      if ((a[i] != p) && (y + a[i] > x))
        if (dfs(x, y + a[i], v + 1, a[i])) {
          ans.push_back(a[i]);
          return true;
        }
  return false;
}
int main() {
  cout.precision(5);
  cout << fixed;
  for (int i = 0; i < 10; i++) {
    char ch;
    cin >> ch;
    if (ch == '1') a.push_back(i + 1);
  }
  cin >> m;
  if (!dfs(0, 0, 0, 0)) {
    cout << "NO";
    return 0;
  }
  cout << "YES" << endl;
  while (ans.size() > 0) {
    cout << ans.back() << ' ';
    ans.pop_back();
  }
  return 0;
}
