#include <bits/stdc++.h>
using namespace std;
vector<int> num;
int len;
int times;
bool dp(vector<int> z, int m, int n, int zxc) {
  if (zxc == times) {
    cout << "YES" << endl;
    for (int i = 0; i < times - 1; i++) cout << z[i] << " ";
    cout << z[times - 1] << endl;
    exit(0);
  }
  for (int i = 0; i < len; i++) {
    if (zxc > 0 && z[zxc - 1] == num[i]) continue;
    z.push_back(num[i]);
    if (zxc % 2 == 0 && m + num[i] > n) dp(z, m + num[i], n, zxc + 1);
    if (zxc % 2 == 1 && n + num[i] > m) dp(z, m, n + num[i], zxc + 1);
    z.pop_back();
  }
  if (zxc == 0) cout << "NO" << endl;
}
int main() {
  string s;
  vector<int> z;
  cin >> s;
  cin >> times;
  for (int i = 0; i < 10; i++) {
    if (s[i] == '1') num.push_back(i + 1);
  }
  len = num.size();
  dp(z, 0, 0, 0);
  return 0;
}
