#include <bits/stdc++.h>
using namespace std;
char str[15];
vector<int> num, ans;
int m;
int pre[1005];
void dfs(int deep, int l, int r, int st) {
  if (deep == m) {
    cout << "YES" << endl;
    cout << pre[1];
    for (int i = 2; i <= m; i++) cout << " " << pre[i];
    exit(0);
  }
  for (int i = 1; i <= 10; i++) {
    if (i == pre[deep] || str[i] == '0') continue;
    if (st == 0) {
      if (l + i > r) {
        pre[deep + 1] = i;
        dfs(deep + 1, l + i, r, 1);
      }
    } else {
      if (r + i > l) {
        pre[deep + 1] = i;
        dfs(deep + 1, l, r + i, 0);
      }
    }
  }
}
int main() {
  scanf("%s", str + 1);
  cin >> m;
  pre[0] = 0;
  dfs(0, 0, 0, 0);
  cout << "NO" << endl;
}
