#include <bits/stdc++.h>
using namespace std;
int m;
vector<int> s(15);
vector<int> ans;
int fn(int diff, int prev, int num) {
  if (num == 0) return 1;
  for (int i = diff + 1; i < 11; i++) {
    if (i == prev || s[i] == 0) continue;
    if (fn(i - diff, i, num - 1) == 1) {
      ans.push_back(i);
      return 1;
    }
  }
  return 0;
}
int main() {
  char a;
  for (int i = 1; i <= 10; i++) {
    cin >> a;
    if (a == '1')
      s[i] = 1;
    else
      s[i] = 0;
  }
  cin >> m;
  if (fn(0, 0, m) == 1) {
    cout << "YES"
         << "\n";
    for (int i = ans.size() - 1; i >= 0; i--) {
      cout << ans[i] << " ";
    }
  } else
    cout << "NO";
  return 0;
}
