#include <bits/stdc++.h>
using namespace std;
long long int mod = 1000000007;
vector<int> wt;
vector<int> ans;
int m;
void dfs(int bal, int pre, int step) {
  if (step == m + 1) {
    cout << "YES"
         << "\n";
    for (auto i : ans) cout << i << " ";
    exit(0);
  }
  if (step & 1) {
    for (auto i : wt) {
      if (bal + i > 0 && i != pre && bal + i <= 10) {
        ans.push_back(i);
        dfs(bal + i, i, step + 1);
        ans.pop_back();
      }
    }
  } else {
    for (auto i : wt) {
      if (bal - i < 0 && i != pre && bal - i >= -10) {
        ans.push_back(i);
        dfs(bal - i, i, step + 1);
        ans.pop_back();
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  cin >> s;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '1') wt.push_back(i + 1);
  }
  cin >> m;
  dfs(0, 0, 1);
  cout << "NO";
  return 0;
}
