#include <bits/stdc++.h>
using namespace std;
const int sz = 1010;
int m, n;
int mark[sz];
bool vis[11];
bool DFS(int id, int last, int A, int B) {
  if (id == m) return true;
  for (int i = 1; i <= 10; i++) {
    if (!(id & 1)) {
      if (A + i > B && vis[i] && i != last) {
        mark[id] = i;
        bool bl = DFS(id + 1, i, A + i, B);
        if (bl) return bl;
        mark[id] = 0;
      }
    } else {
      if (B + i > A && vis[i] && i != last) {
        mark[id] = i;
        bool bl = DFS(id + 1, i, A, B + i);
        if (bl) return bl;
        mark[id] = 0;
      }
    }
  }
  return false;
}
int main() {
  int i, j, k;
  bool bl = false;
  string str;
  cin >> str;
  int len = str.length();
  cin >> m;
  for (i = 0; i < len; i++) {
    if (str[i] == '1') vis[i + 1] = 1;
  }
  if (m == 1) {
    for (i = 1; i <= 10; i++) {
      if (vis[i]) {
        cout << "YES\n";
        cout << i << '\n';
        return 0;
      }
    }
    cout << "NO\n";
    return 0;
  }
  for (i = 1; i <= 10; i++) {
    for (j = i + 1; j <= 10; j++) {
      if (vis[i] && vis[j]) {
        bl = DFS(2, j, i, j);
        if (bl) {
          cout << "YES\n";
          cout << i << " " << j;
          for (k = 2; k < m; k++) cout << " " << mark[k];
          cout << '\n';
          return 0;
        }
      }
    }
  }
  cout << "NO\n";
}
