#include <bits/stdc++.h>
using namespace std;
int dp[1010][11][11];
int b[1010][11][11];
void print(int i, int j, int k) {
  if (i != 1) print(i - 1, k - j, b[i][j][k]);
  cout << k << " ";
}
int main() {
  char s[11];
  int m, num[11];
  cin >> (s + 1);
  scanf("%d", &m);
  for (int i = 1; i <= 10; i++) {
    if (s[i] == '1')
      num[i] = 1;
    else
      num[i] = 0;
  }
  memset(dp, 0, sizeof(dp));
  for (int i = 1; i <= 10; i++) {
    if (num[i] == 1) dp[1][i][i] = 1;
  }
  for (int i = 2; i <= m; i++) {
    for (int j = 1; j < 10; j++) {
      for (int k = j + 1; k <= 10; k++) {
        if (num[k] == 1)
          for (int t = 1; t <= 10; t++) {
            if (num[t] && t != k)
              if (dp[i - 1][k - j][t]) {
                dp[i][j][k] = 1;
                b[i][j][k] = t;
              }
          }
      }
    }
  }
  bool flag = true;
  for (int i = 1; i < 11; i++) {
    for (int j = 1; j < 11; j++) {
      if (dp[m][i][j]) {
        flag = false;
        cout << "YES" << endl;
        print(m, i, j);
        puts("");
      }
      if (!flag) break;
    }
    if (!flag) break;
  }
  if (flag) cout << "NO" << endl;
  return 0;
}
