#include <bits/stdc++.h>
using namespace std;
int dp[1010][101][12];
string wgts;
vector<int> vans;
int n;
int solve(int p, int dif, int last) {
  if (p == n) {
    cout << "YES\n";
    for (__typeof((vans).begin()) it = (vans).begin(); it != (vans).end();
         ++it) {
      if (it != vans.begin()) cout << " ";
      cout << *it;
    }
    cout << "\n";
    exit(0);
  }
  int& ans = dp[p][dif][last];
  if (ans != -1) return ans;
  ans = 0;
  for (int i = dif + 1; i < (11); ++i)
    if (i != last && wgts[i - 1] == '1') {
      vans.push_back(i);
      if (solve(p + 1, i - dif, i)) {
        vans.pop_back();
        return ans = 1;
      } else
        vans.pop_back();
    }
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  ;
  cin >> wgts >> n;
  memset(dp, -1, sizeof(dp));
  solve(0, 0, 0);
  cout << "NO\n";
  return 0;
}
