#include <bits/stdc++.h>
using namespace std;
bool pos = false;
void nig(vector<int> &ans, vector<int> &ar, int sum1, int sum2, int n) {
  if (ans.size() == n) {
    pos = true;
    cout << "YES\n";
    for (int i = 0; i < n; i++) cout << ans[i] << " ";
    exit(0);
  }
  int N = ar.size();
  for (int i = 0; i < N; i++) {
    int ins = ans.size();
    if (ins % 2 == 0) {
      if (ins == 0) {
        ans.push_back(ar[i]);
        sum1 += ar[i];
        nig(ans, ar, sum1, sum2, n);
        ans.pop_back();
        sum1 -= ar[i];
      } else if (ar[i] + sum1 > sum2 && ins != 0 && ar[i] != ans[ins - 1]) {
        ans.push_back(ar[i]);
        sum1 += ar[i];
        nig(ans, ar, sum1, sum2, n);
        ans.pop_back();
        sum1 -= ar[i];
      }
    } else {
      if (ar[i] + sum2 > sum1 && ar[i] != ans[ins - 1]) {
        ans.push_back(ar[i]);
        sum2 += ar[i];
        nig(ans, ar, sum1, sum2, n);
        ans.pop_back();
        sum2 -= ar[i];
      }
    }
  }
}
int main() {
  string s;
  cin >> s;
  std::vector<int> ar;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '1') {
      ar.push_back(i + 1);
    }
  }
  int n;
  cin >> n;
  vector<int> ans;
  nig(ans, ar, 0, 0, n);
  if (!pos) cout << "NO\n";
}
