#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 10;
const long long MOD = 1e9 + 7;
const long long EPS = 1;
const long double e = 2.7182818284590452353602875;
const long long dx[] = {0, 1, -1, 0, 0};
const long long dy[] = {0, 0, 0, 1, -1};
string a;
long long m, t, t1, mn = 1e18, l, r, sum, cnt, us[N], dp[N];
vector<int> g[N], ans, answer;
bool ok;
void get_ans(int x) {
  if (ans.size() == m) {
    cout << "YES" << '\n';
    for (int i = 0; i < ans.size(); i++) {
      cout << ans[i] << " ";
    }
    exit(false);
  }
  for (int i = 0; i < g[x].size(); i++) {
    if (g[x][i] != x && dp[ans.size() - 2] + g[x][i] > dp[ans.size() - 1]) {
      ans.push_back(g[x][i]);
      dp[ans.size() - 1] = dp[ans.size() - 3] + g[x][i];
      get_ans(g[x][i]);
      dp[ans.size() - 1] = 0;
      ans.pop_back();
    }
  }
}
int main() {
  cin >> a;
  cin >> m;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] == '1') {
      answer.push_back(i + 1);
    }
  }
  for (int i = 0; i < answer.size(); i++) {
    for (int j = 0; j < answer.size(); j++) {
      g[answer[i]].push_back(answer[j]);
    }
  }
  if (answer.size() == 0 || (answer.size() == 1 && m >= 2)) {
    cout << "NO";
    return 0;
  }
  for (int k = 0; k < answer.size(); k++) {
    fill(dp + 1, dp + 9000 + 1, 0);
    ans.clear();
    dp[0] = answer[k];
    ans.push_back(answer[k]);
    get_ans(answer[k]);
  }
  cout << "NO";
  return 0;
}
