#include <bits/stdc++.h>
using namespace std;
char word[13];
int m, pans[5], last;
bool found;
int main() {
  scanf("%s", word);
  scanf("%d", &m);
  vector<int> used;
  for (int t = 0; t < 10; t++) {
    last = 0;
    pans[0] = 0;
    pans[1] = 0;
    used.clear();
    for (int i = 1; i <= m; i++) {
      found = false;
      for (int j = (i == 1 ? t : 0); j < 10; j++)
        if (j + 1 != last && word[j] == '1' &&
            pans[i & 1] + j + 1 > pans[(i + 1) & 1]) {
          last = j + 1;
          used.push_back(j + 1);
          pans[i & 1] += j + 1;
          found = true;
          break;
        }
      if (!found) break;
    }
    if (found) break;
  }
  if (!found)
    printf("NO\n");
  else {
    printf("YES\n");
    for (int i = 0; i < used.size(); i++) {
      if (i > 0) printf(" ");
      printf("%d", used[i]);
    }
    printf("\n");
  }
  return 0;
}
