#include <bits/stdc++.h>
using namespace std;
const int N = 111111;
const int INF = 1000000000, mod = 1000000007;
const long long LLINF = 1000000000000000000ll;
bool can[25][11][1111];
struct previous {
  int balance;
  int lastWeight;
  previous() {}
  previous(int bal, int weight) : balance(bal), lastWeight(weight) {}
};
previous p[25][11][1111];
char s[11];
int m;
int main() {
  gets(s);
  scanf("%d", &m);
  can[10][0][0] = 1;
  for (int step = 0; step < m; ++step) {
    for (int last = 0; last < 11; ++last) {
      for (int balance = -10; balance <= 10; ++balance) {
        if (!can[balance + 10][last][step]) continue;
        for (int nowLast = 1; nowLast < 11; ++nowLast) {
          if (s[nowLast - 1] == '0') continue;
          if (last == nowLast) continue;
          int newBalance = balance + (step % 2 == 0 ? +nowLast : -nowLast);
          if ((newBalance < -9 && step % 2 == 0) ||
              (newBalance > 9 && step % 2 == 1))
            continue;
          if (balance < 0 && newBalance < 0) continue;
          if (balance > 0 && newBalance > 0) continue;
          if (newBalance == 0) continue;
          can[newBalance + 10][nowLast][step + 1] = 1;
          p[newBalance + 10][nowLast][step + 1] = previous(balance, last);
        }
      }
    }
  }
  for (int last = 1; last < 11; ++last) {
    for (int balance = -10; balance <= 10; ++balance) {
      if (can[balance + 10][last][m]) {
        vector<int> res;
        previous cur = previous(balance, last);
        int curStep = m;
        while (curStep != 0) {
          res.push_back(cur.lastWeight);
          cur = p[cur.balance + 10][cur.lastWeight][curStep--];
        }
        puts("YES");
        for (int i = (int)res.size() - 1; i >= 0; --i) {
          printf("%d ", res[i]);
        }
        exit(0);
      }
    }
  }
  puts("NO");
  return 0;
}
