#include <bits/stdc++.h>
using namespace std;
int w[11], m;
int ans[10000];
bool solve(int l, int r, int pre, int cnt) {
  if (cnt == m) return true;
  bool t = false;
  for (int i = 0; i < 11; i++) {
    if (i == pre) continue;
    if (w[i]) {
      if (cnt % 2) {
        if (r + i > l) {
          t = solve(l, r + i, i, cnt + 1);
        }
      } else {
        if (l + i > r) {
          t = solve(l + i, r, i, cnt + 1);
        }
      }
    }
    if (t) {
      ans[cnt] = i;
      return true;
    }
  }
  return false;
}
int main() {
  string s;
  cin >> s;
  cin >> m;
  for (int i = 0; i < s.size(); i++)
    if (s[i] == '1') w[i + 1] = 1;
  if (solve(0, 0, 0, 0)) {
    cout << "YES" << '\n';
    for (int i = 0; i < m; i++) cout << ans[i] << " ";
  } else {
    cout << "NO";
  }
  cout << '\n';
}
