#include <bits/stdc++.h>
using namespace std;
const long long N = 11;
long long dp[N][N][N * 100];
signed main() {
  string s;
  cin >> s;
  long long m;
  cin >> m;
  vector<long long> girs;
  for (long long i = 1; i <= 10; ++i) {
    if (s[i - 1] == '1') {
      girs.push_back(i);
      dp[i][i][1] = -1;
    }
  }
  for (long long k = 1; k <= m - 1; ++k) {
    for (long long bal = 0; bal <= 10; ++bal) {
      for (auto last_gir : girs) {
        if (dp[bal][last_gir][k]) {
          for (auto cur_gir : girs) {
            if (cur_gir == last_gir || cur_gir <= bal) continue;
            dp[cur_gir - bal][cur_gir][k + 1] = last_gir;
          }
        }
      }
    }
  }
  long long bal = -1, last_gir = -1;
  for (long long b = 0; b <= 10; ++b) {
    for (long long last : girs) {
      if (dp[b][last][m]) {
        last_gir = last;
        bal = b;
      }
    }
  }
  if (last_gir == -1 && bal == -1) return cout << "NO", 0;
  cout << "YES\n";
  vector<long long> ans;
  while (dp[bal][last_gir][m] != -1) {
    ans.push_back(last_gir);
    long long bal_last = bal;
    bal = last_gir - bal;
    last_gir = dp[bal_last][last_gir][m];
    --m;
  }
  ans.push_back(last_gir);
  reverse(ans.begin(), ans.end());
  for (auto u : ans) cout << u << ' ';
}
