#include <bits/stdc++.h>
using namespace std;
int m;
vector<int> ans;
string s;
void Dfs(int step, int weight, int diff) {
  if (step == m) {
    cout << "YES" << '\n';
    for (int i = 0; i < m; ++i) cout << ans[i] << " ";
    exit(0);
  }
  for (int i = 1; i <= 10; ++i)
    if (s[i - 1] == '1' && i != weight) {
      if (step % 2 == 0 && diff + i > 0) {
        ans.push_back(i);
        Dfs(step + 1, i, diff + i);
        ans.pop_back();
      } else if (step % 2 == 1 && diff - i < 0) {
        ans.push_back(i);
        Dfs(step + 1, i, diff - i);
        ans.pop_back();
      }
    }
}
int main() {
  cin >> s >> m;
  Dfs(0, 0, 0);
  cout << "NO";
  return 0;
}
