#include <bits/stdc++.h>
using namespace std;
const int MX = 1e2 + 7;
const int INF = 0x3f3f3f3f;
int num[11];
int m;
int flag = 0;
vector<int> v;
vector<int> ans;
void dfs(int u, int l, int r, int k) {
  if (flag) return;
  if (k == m + 1) {
    flag = 1;
    for (int i = 0; i < v.size(); ++i) {
      ans.push_back(v[i]);
    }
    return;
  }
  for (int i = 1; i <= 10; ++i) {
    if (!num[i] || i == u) continue;
    if (k % 2 == 1) {
      if (i + l > r) {
        v.push_back(i);
        dfs(i, i + l, r, k + 1);
        v.pop_back();
      }
    } else {
      if (i + r > l) {
        v.push_back(i);
        dfs(i, l, i + r, k + 1);
        v.pop_back();
      }
    }
  }
  return;
}
int main(int argc, char const *argv[]) {
  for (int i = 1; i <= 10; ++i) {
    scanf("%1d", &num[i]);
  }
  cin >> m;
  dfs(0, 0, 0, 1);
  if (!ans.size())
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    for (int i = 0; i < ans.size(); ++i) cout << ans[i] << " ";
    cout << endl;
  }
  return 0;
}
