#include <bits/stdc++.h>
using namespace std;
vector<int> ans;
string second;
int n;
bool cal(int diff, int last, int m) {
  if (n == m) return true;
  for (int i = diff; i < 10; i++) {
    if (second[i] == '1' && i != last) {
      ans.push_back(i + 1);
      if (cal(i + 1 - diff, i, m + 1)) return true;
      ans.pop_back();
    }
  }
  return false;
}
void solve() {
  cin >> second >> n;
  if (cal(0, -1, 0)) {
    cout << "YES\n";
    for (int i = 0; i < n; i++) cout << ans[i] << " ";
  } else
    cout << "NO\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
