#include <bits/stdc++.h>
using namespace std;
const long long int inf = 0x3f3f3f3f3f3f3f3fll;
vector<int> adj[500005];
vector<int> ans;
int n, m, k, q;
pair<int, int> dp[500005];
vector<int> weight;
bool solve(int b, int p, int k) {
  if (k == m) return true;
  for (int i = 0; i < weight.size(); i++) {
    if (i == p) continue;
    if (b >= 0 && b - weight[i] < 0) {
      if (solve(b - weight[i], i, k + 1)) {
        ans.push_back(weight[i]);
        return true;
      }
    } else if (b < 0 && b + weight[i] > 0) {
      if (solve(b + weight[i], i, k + 1)) {
        ans.push_back(weight[i]);
        return true;
      }
    }
  }
  return false;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s >> m;
  for (int i = 0; i < 10; i++) {
    if (s[i] == '1') weight.push_back(i + 1);
  }
  if (solve(0, -1, 0)) {
    cout << "YES" << endl;
    reverse(ans.begin(), ans.end());
    for (int i : ans) cout << i << " ";
  } else
    cout << "NO" << endl;
  return 0;
}
