#include <bits/stdc++.h>
using namespace std;
int m;
char s[15];
int ans[1005];
bool num[15];
bool dfs(int suml, int sumr, int cot, int pre) {
  if (cot == m + 1) return true;
  if (cot & 1) {
    for (int i = 1; i <= 10; i++)
      if (num[i] && i != pre && suml + i > sumr) {
        ans[cot] = i;
        if (dfs(suml + i, sumr, cot + 1, i)) return true;
      }
  } else {
    for (int i = 1; i <= 10; i++) {
      if (num[i] && i != pre && sumr + i > suml) {
        ans[cot] = i;
        if (dfs(suml, sumr + i, cot + 1, i)) return true;
      }
    }
  }
  return false;
}
int main() {
  scanf("%s", s + 1);
  for (int i = 1; i <= 10; i++)
    if (s[i] == '1') num[i] = 1;
  scanf("%d", &m);
  if (!dfs(0, 0, 1, 0))
    printf("NO\n");
  else {
    printf("YES\n");
    for (int i = 1; i <= m; i++) printf("%d ", ans[i]);
    printf("\n");
  }
  return 0;
}
