#include <bits/stdc++.h>
using namespace std;
string we;
int m, w[11];
vector<int> res;
int recur(int b, int prev, int s) {
  if (s == m + 1) {
    return 1;
  }
  if (s % 2 == 0) {
    for (int i = 1; i <= 10; i++) {
      if (w[i] and b - i < 0 and i != prev) {
        if (recur(b - i, i, s + 1)) {
          res.push_back(i);
          return 1;
        }
      }
    }
  } else {
    for (int i = 1; i <= 10; i++) {
      if (w[i] and b + i > 0 and i != prev) {
        if (recur(b + i, i, s + 1)) {
          res.push_back(i);
          return 1;
        }
      }
    }
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> we >> m;
  for (int i = 0; i < 10; i++) {
    w[i + 1] = we[i] - '0';
  }
  for (int i = 1; i <= 10; i++) {
    if (w[i])
      if (recur(i, i, 2)) {
        res.push_back(i);
        cout << "YES\n";
        for (int i = res.size() - 1; i >= 0; i--) {
          cout << res[i] << " ";
        }
        cout << "\n";
        return 0;
      }
  }
  cout << "NO\n";
  return 0;
}
