#include <bits/stdc++.h>
using namespace std;
string rocks;
int m;
vector<int> ans(1007);
void dp(int idx, int diff, int last) {
  if (idx == 0) {
    cout << "YES\n";
    for (int i = m; i > 0; --i) cout << ans[i] << ' ';
    exit(0);
  }
  for (int i = 0; i < 10; ++i) {
    if (rocks[i] == '1' && i + 1 != last && i + 1 - diff > 0) {
      ans[idx] = i + 1;
      dp(idx - 1, i + 1 - diff, i + 1);
    }
  }
}
int main() {
  cin >> rocks >> m;
  dp(m, 0, 0);
  cout << "NO\n";
  return 0;
}
