#include <bits/stdc++.h>
using namespace std;
string s;
int n;
int was[1005][11][11];
int ans[1005];
int solve(int index, int dif, int last) {
  if (index > 0 && dif <= 0 || dif > 10) return 0;
  if (index == n) {
    puts("YES");
    for (int i = 0; i < n; i++) printf("%d ", ans[i]);
    return 1;
  }
  if (was[index][dif][last]) return 0;
  was[index][dif][last] = 1;
  for (int i = 0; i < 10; i++) {
    if (s[i] == '1' && i != last) {
      ans[index] = i + 1;
      if (solve(index + 1, i + 1 - dif, i)) return 1;
    }
  }
  return 0;
}
int main() {
  cin >> s;
  cin >> n;
  if (!solve(0, 0, 10)) puts("NO");
  return 0;
}
