#include <bits/stdc++.h>
using namespace std;
const int N = 1050;
const int offset = 25;
int n, pre[N][100];
bool dp[N][100];
vector<int> rec;
string weight;
void outPut(int i, int j) {
  if (i == 0) return;
  if (j < 0)
    outPut(i - 1, j + pre[i][j + offset]);
  else
    outPut(i - 1, j - pre[i][j + offset]);
  rec.push_back(pre[i][j + offset]);
}
int main() {
  cin >> weight >> n;
  memset(dp, false, sizeof(dp));
  dp[0][0 + offset] = true;
  pre[0][0 + offset] = -1;
  for (int i = 0; i < n; i++)
    for (int j = -10; j <= 10; j++) {
      if (dp[i][j + offset] == false) continue;
      for (int k = 1; k <= 10; k++) {
        if (weight[k - 1] == '0') continue;
        if (j <= 0 && k > abs(j) && k != pre[i][j + offset])
          dp[i + 1][j + k + offset] = true, pre[i + 1][j + k + offset] = k;
        if (j > 0 && k > j && k != pre[i][j + offset])
          dp[i + 1][j - k + offset] = true, pre[i + 1][j - k + offset] = k;
      }
    }
  bool ans = false;
  int which = -1;
  for (int j = -10; j <= 10; j++)
    if (dp[n][j + offset]) {
      ans = true, which = j;
      break;
    }
  if (!ans) {
    puts("NO");
    return 0;
  } else
    puts("YES");
  outPut(n, which);
  for (int i = 0; i < (int)rec.size(); i++)
    cout << rec[i] << (i == (int)rec.size() - 1 ? '\n' : ' ');
  return 0;
}
